Web Hosting Talk







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


Z400Central
01-10-2003, 10:39 PM
Got this one guy that just keeps at it.....I basically want to shut him out from viewing my site/forum....im running phpbb (not sure how to make it so unregistered peeps can view the forum but keep certain people out) and im running cpanel if that helps any......thanks!

Deb
01-10-2003, 11:01 PM
Yes, you may block certain IP addresses from accessing your site by using a Deny directive in an .htaccess file. (as long as your host allows .htaccess)

The Apache documentation which explains the procedure in detail is located at:
http://httpd.apache.org/docs/mod/mod_access.html
http://httpd.apache.org/docs/howto/auth.html

Placing a .htaccess file in a directory that contains the following would block the IPs from visiting anything within that directory, including other directories within it.

Deny from 255.255.255.255
Deny From 144.144.144

The 1st Deny directive would block the exact IP address 255.255.255.255. The 2nd Deny directive would block all IP addresses fitting the pattern 144.144.144 , including 144.144.144.1, 144.144.144.2, 144.144.144.254, etc.

Lamont
01-10-2003, 11:53 PM
Go into the phpBB administration panel and select Ban Control under the User Admin section at the bottom of the right side. You can enter IPs, domains and usernames to ban.