Basic iptables
With the default firewall 'iptables' installed in the server, you can customize your firewall with different kinds of rules. In the most general way you can block or unblock any IP using the following commands.
TO BLOCK an IP in the iptables firewall: iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
TO UNBLOCK an IP in the iptables firewall: iptables -A INPUT -s xxx.xxx.xxx.xxx -j ACCEPT
Replace the "xxx.xxx.xxx.xxx" with the IP you need to block/unblock
After this save the rules added by /etc/init.d/iptables save
For further information you can have a quick search through google or through the shell itself (man iptables)








