How to block IP address in Linux via ssh:

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

iptables -I INPUT -s -j DROP

or you can use append

iptables -A INPUT  -s -j DROP

How Do I Block Subnet (xx.yy.zz.ww/ss)?

Use the following syntax to block on eth1 public interface:
iptables -i eth1 -A INPUT -s -j DROP

How Do I View Blocked IP Address?

Simply use the following command:
iptables -L -v

How Do I Save Blocked IP Address?
service iptables save

 This article has been provided by Codero Hosting, the leading provider of reliable dedicated, managed and cloud hosting services. Need more information on this topic or to learn more about Codero’s hosting services please visitwww.codero.comchat with us online or give us a call at 866-2-CODERO. Posted in
Last update:
2015-12-03 20:39
Average rating:0 (0 Votes)