Block IP with iptables

Block Incoming Request From IP

The following command will drop any packet coming from the IP address

# /sbin/iptables -I INPUT -s {IP-HERE} -j DROP
# /sbin/iptables -I INPUT -s -j DROP

Finally, the last thing we need to do is save our rules so that next time we reboot our computer our rules are automatically reloaded:

# /sbin/service iptables save

Check to see if it is added:

# iptables --list -n | grep
DROP       all  --

Other good info to check out:

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.