Can you recommend a good intro to iptables?
I'm going to be setting up IPTables on my server. I have never done anything with IPTables and want to get started. What are your most common configurations, or your must-haves?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
I'd review the netfilter documentation before doing much of anything. Understanding how packets flow through the various tables and chains (where routing decisions are made, etc) is a good first thing to understand. Then you'll have a feel for what the product is capable of.
As far as something practical: You should start your INPUT, FORWARD, and OUTPUT chains with the following to allow established connections to "shortcut" evaluating all the rules on the chains and to drop patently invalid packets before any further evaluation is done:
This will help with performance, though you may not be moving enough traffic for it to make any real difference.
You should think strongly about setting the default policy on your "filter" table chains to DROP, and designing your rules to explicitly allow traffic through, rather than attempting to block traffic.
The preferred interface to simple firewalling on Ubuntu is ufw. You could start by using it, and then progressively move on to handwritten iptables rules as your needs grow. The command
The iptables Ubuntu wiki page is a good starting point for documentation.