How To Block IP Address using IPTABLES

Tags: January 3, 2014 11:17 PM

Make sure running the iptables command as root. Example below shows how to block traffic coming from IP

# iptables -I INPUT -s -j DROP
Turn on some logging on those rule, we insert it at line two. Assuming the first iptables command was the at line one.
# iptables -I INPUT 2 -s -j LOG --log-prefix "Dropped an As*hole"

Share on Facebook Twitter


Post a Comment