Ubuntu as any other Linux distribution comes with netfilter iptables as default firewall. This is one of the best firewall software for Unix family operating systems: it allows to perform various filtering operations and makes it possible to match packets using numerous ways starting from data in IP packet header and ending with Layer 7 packet inspection (but this is another topic).
Below you can find a list of articles on the Web helping to understand the logic of Ubuntu iptables setup as well as create powerful firewall from your Ubuntu system:
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.
Don’t forget to look through page’s comments as there is a lot of useful staff there.
3. Setting Up An Iptables Firewall On Ubuntu With Firehol from Howtoforge:
FireHOL is a stateful iptables packet filtering firewall configurator. It is abstracted, extensible, easy and powerful. It can handle any kind of firewall, but most importantly, it gives you the means to configure it, the same way you think of it.
4. Basic sshd and iptables security in Ubuntu
5. Use iptables as firewall with a daemon on system startup
This howto is intended to set up a firewall without installing firestarter (useful if you don’t use any wm, eg: servers). It uses iptables which is available with a fresh Ubuntu install, and a init.d script to run it as a daemon on boot.
6. Set up Ubuntu as a firewall/gateway router with webmin
7. Netfilter & Iptables in Ubuntu (French)
8. Set a custom firewall (iptables) and Tips [Beginners edition]
9. Set a custom firewall (iptables) and Tips [Advanced user only]
10. iptables premier
“Do I need a firewall?” is a FAQ on the Ubuntu Forums. In order to answer that question we need to understand what you want to do accomplish by using (configuring) a firewall. The purpose of this post is to introduce iptables and encourage appropriate use.
Without proper protection your server is a sitting duck waiting for a bot to guess the right combination and hit the jackpot. But with just 2 commands we can stop that.
Of course you can try google to find more articles about how to configure iptables in Ubuntu Linux but I am sure that above mentioned links will help you to move forward with configuring Ubuntu iptable and take the first steps on builing secure and stable iptables firewall box.