Truthfully told, there's not a lot you can do to guard against a real DDoS attack at the server level. There's no setting you can tweak that's going to defends you against gigs of traffic targeted at a specific server.
To prevent the symptoms of a DDoS, the best (and most expensive way) is to use a service like Prolexic which aggregates tons and tons of bandwidth and cleans your traffic. There are also devices which you can use to help filter out bad traffic, but again, it depends on what kind of Internet you have coming into the data center you're in. If they're on an OC-3, a DDoS could completely saturate the connection from multiple providers and no device in the world is going to save you from that. If you're in a place that has gigs and gigs of pipe, then those appliances can be more useful.
To stop the symptoms of a DDoS, you really need some kind of cooperation with the providers of your data center's ISPs. There's only so much you can do on your own.