Some times there is a need to block specific IP addresses, for example: you saw that you mysql server sometimes is crashing, than you checked /var/log/apache2/access.log and you saw that your website is receiving DDoS attack.
To ban IP address type something like this in command line tool (IP address “22.214.171.124” must be changed):
iptables -A INPUT -s 126.96.36.199 -j DROP
To check which IP addresses were banned:
iptables -L INPUT -v -n