Using IP Tables to quickly block an IP address

To block an offending (DOS/Spam/Password hacking attempts etc) IP address from connecting to your server, use iptables.

xx.xx.xx.xx is ip address of remote.

iptables -A INPUT -s xx.xx.xx.xx -j DROP

To undo:

iptables -D INPUT -s xx.xx.xx.xx -j DROP

Codemonkey of Node.js, Django, PHP and all things HTML5 Solving tech challenges, one bit at a time.

Posted in iptables Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *