Web Hosting Talk







View Full Version : Blocking IP`s at server level?


sford999
05-24-2004, 12:02 PM
I`m wondering if theres a way of blocking IP ranges at server level instead of account level?

I know it can be done via cpanel/.htaccess, but I`ve 2 ranges that I don`t want to access one of my servers.

TIA

Dynanet
05-24-2004, 12:35 PM
Using IPTables it's ...

/sbin/iptables -I INPUT -s [ipaddress] -j DROP

If you have APF installed it's ...
/etc/apf/apf -d [ipaddress]

MikeMc
05-24-2004, 02:03 PM
About the ip to insert in the iptables rule :

xxx.xxx.xxx.xxx : blocks Single ip

xxx.0.0.0/8

xxx.xxx.0.0/16

xxx.xxx.xxx.0/24