Go read this fantastic post over on Ubuntu Unleased that tells you how to harden your system with the largely unknown command sysctl.  With the script given there, you effectively protect yourself against most network-based attacks, including man in the middle attacks, packets from spoofed ips, and a couple other things.  There are also some pretty geeky system tweaks in there like file system performance increases, and increases to the speed and efficiency of the tcp/ip stack. 

I'm not sure this will work on other distributions, but if anyone wants to try it and report back, it'd be greatly appreciated.  Please also note that getting 3 errors when running that script is normal, those particular options are removed from the latest Ubuntu's kernel.  Read the comments on that page for more details.