iptables -I INPUT -s 18.104.22.168 -j DROP
or you can use append
iptables -A INPUT -s 22.214.171.124 -j DROP
How Do I Block Subnet (xx.yy.zz.ww/ss)?
Use the following syntax to block 10.0.0.0/8 on eth1 public interface:
iptables -i eth1 -A INPUT -s 10.0.0.0/8 -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.com, chat with us online or give us a call at 866-2-CODERO. Posted in