Well to get optimum security for your server its necessary to install a good firewall. ConfigServer Security & Firewall is a free software based security system developed as an SPI iptables firewall that is comprehensive, straight-forward, easy and flexible to configure.

For Detailed Features Follow the link below:-

How To Install ConfigServer Security & Firewall:-

rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Now you check do your server has required iptables or not

perl /etc/csf/csftest.pl

If you server has control panel like direct admin or cpanel you can configure CSF from inside your control pane and track everything using GUI.

How To Uninstall CSF:-

On cPanel servers:

cd /etc/csf
sh uninstall.sh

On DirectAdmin servers:

cd /etc/csf
sh uninstall.directadmin.sh

On generic linux servers:

cd /etc/csf
sh uninstall.generic.sh