Blocking IPs with iptables

Howto block IP address with iptables and simple usage.

Command examples
Block IP using iptables simply use the following command by replacing the appropriate IP in the below command :

iptables -I INPUT -s 212.56.88.143 -j DROP

If you wish to unblock any IP then the same command can be used as below :

iptables -I INPUT -s 212.56.88.143 -j ACCEPT

To delete all iptables rules :

iptables -F

To list all iptables rules :

iptables -L -n