PDA

View Full Version : How to block an IP from your site?


christopher_
01-18-2003, 06:34 PM
I don't know if this is the right board to be posting this on, but does anyone know of a code, css or html, to block a certain IP from your website? I have two Ip's I want to block from being able to visit my site, just don't know a code to do it.

If anyone knows, please post the code here.

kevin
01-19-2003, 02:09 AM
your best bet is to use htaccess for something like that. Do a search for htaccess tutorials, there are plenty of them on the internet.

Jason
01-19-2003, 03:47 AM
If you have root server permissions:

iptables -A INPUT -s xxx.xx.xxx.xx -j DROP

rdove
01-19-2003, 08:28 PM
If you want to use ASP:



if request.servervariables("REMOTE_ADDR") = 111.11.11.111 then
code...
end if