LexiConn Knowledgebase

Knowledgebase Home | Favorites Knowledgebase Home | Favorites
Search the Knowledgebase Browse by Category
How do I block an IP from accessing my website?
Article Details

Last Updated
9th of July, 2008

User Opinions (36 votes)
27% thumbs up 72% thumbs down

How would you rate this answer?
Helpful
Not helpful

You can block an IP address from accessing your website by editing a file named ".htaccess" in your main "www" directory. This file is simply a text file. You can add the following text to the file:

<Limit GET POST>
order allow,deny
allow from all
deny from 192.168.1.100
deny from 192.168.2.
</Limit>

The above settings would block the IP 192.168.1.100 and block anyone from the IP range 192.168.2.0 to 192.168.2.255.

You can add as many deny lines as needed to block different IP addresses.

NOTE: If you have Frontpage extensions installed, you do not want to edit the .htaccess file, as this can break the Frontpage extensions.

If you have any problems in setting this up, simply let us know the IP number you want blocked, and we can edit the .htaccess file directly and add the IP number.


Related Articles
Attachments
No attachments were found.

Powered by Interspire Knowledge Manager Knowledgebase Software