Web Hosting Talk







View Full Version : Blocking IP


kapot
04-07-2004, 12:46 PM
I am using RedHat 9.0.

How to block IP or networks from reaching my server using iptables ?

Blocking means any access.

Please help,

Thanks.

Dynanet
04-07-2004, 12:52 PM
/sbin/iptables -A INPUT -s [ipaddress] -j DROP

That will drop everything from the -s (source) address.

phpdeveloper
04-07-2004, 02:54 PM
/sbin/iptables -I INPUT 1 -s [ipaddress] -j DROP

will put the rule first.