Setting Up An Iptables Firewall On Ubuntu With Firehol

Everybody, who tried to configure an iptables firewall knows, that it can be quite a PITA. firehol is a tool that helps us to configure iptables according to our needs. In this How-To, I will discribe how to set up an iptables firewal using firehol that only allows SSH and ICMP (the protocol responsible for ping and traceroute). Also, only incoming connections are filtered, and outgoing connections are allowed.

Step One - Installing firehol

Installing firehol is quite easy, as it is in the official repositories. Just open a terminal and do a

            sudo aptitude install firehol

and you're all ready. Don't close your terminal, because we will need it some more. 

Step Two - Setting firehol up