Jump to content

Blocking An Ip


Recommended Posts

Hi -

 

I've blocked an IP address from my site. Now I'm wondering:

 

- When that IP address tries to access my site, what do they see? Do they get a message that says they're blocked? Or do they just get a 404 error?

 

- If they get a "you are blocked" message, can I edit that text somehow?

 

- Will Awstats continue to log their access attempts? Or will that IP just never show up again in my stats?

 

Thanks.

Link to comment
Share on other sites

I've blocked an IP address from my site. Now I'm wondering:

 

- When that IP address tries to access my site, what do they see? Do they get a message that says they're blocked? Or do they just get a 404 error?

They will see a standard 403 "Forbidden" error page generated by the server.

 

- If they get a "you are blocked" message, can I edit that text somehow?

You can serve a custom error page by using an ErrorDocument directive in your /public_html directory's .htaccess file:

>ErrorDocument 403 /my403error.php

You should create the page and put it in the directory before adding the ErrorDocument directive. The page itself can be any type of page (HTML, PHP, perl, etc.), and can have whatever name you want.

 

- Will Awstats continue to log their access attempts? Or will that IP just never show up again in my stats?

Yes, AWStats will continue to log access attempts even after you've banned the IP address on the server. These are reported at the very bottom of the page under "HTTP Error Codes". You'd be interested in the stats for "403 Forbidden". These are also in your server log detail (if you look at your logs). You can identify those records either by the IP address (the one you've banned), or by the status code (403).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...