Iptables is a firewall, installed by default on all official Ubuntu distributions (Ubuntu, Kubuntu, Xubuntu). When you install Ubuntu, iptables is there, but it allows all traffic by default.
There is a wealth of information available about iptables, but much of it is fairly complex, and if you want to do a few basic things, this
How To is for you.
The HowTo covers the folllowing topics:
Contents
1. Basic iptables howto
2. Basic Commands
3. Basic Iptables Options
4. Allowing Established Sessions
5. Allowing Incoming Traffic on Specific Ports
6. Blocking Traffic
7. Editing iptables
8. Logging
9. Saving iptables
10. Configuration on startup
11. Configuration on Startup for NetworkManager
12. Tips
1. If you manually edit iptables on a regular basis
2. Using iptables-save/restore to test rules
3. More detailed Logging
4. Disabling the firewall
13. Easy configuration via GUI (Firestarter related)
14. Further Information
15. Credits
Also, here is another great Ubuntu beginners iptables setup for beginners:
HOWTO: Set a custom firewall (iptables) and Tips [Beginners edition].
-- Tom