On Thu, 28 Oct 1999, Eric L. Damron wrote:

> How can I block access to my web server to a particular IP address?
> 
> Thanks.

via apache,

edit /etc/httpd/conf/httpd.conf, go down to the line 
--
<Directory />
-- 

This is line 369 in mine. insert below that (make a backup)

--
order deny,allow
deny from 127.0.0.1, 127.0.0.2 #<-- Block these ips.
allow from all
--
save and close it. then rehash the server

/etc/rc.d/init.d/httpd restart
or
apachectl restart

All done..

Or
via kernel/ipchains,

ipchains -I input -p TCP -s 127.0.0.1 -d 0/0 80 -j DENY # -l

Replace 127.0.0.1 with the ip or mask to block, and remove the # if you
want it to log all the DENY's

--
MandrakeSoft          http://www.mandrakesoft.com/
                                        --Axalon

Reply via email to