Portal Home > Knowledgebase > Articles Database > Setting up APF to display a error page for banned IPs?
Setting up APF to display a error page for banned IPs?
Posted by MartynD, 09-30-2007, 12:48 PM |
when you add a banned ip to APF it doesnt show anything when the user visits the site, just a blank page. is there anyway to set up a page such as "You IP Address has been banned, if you believe this to be a mistake please contact... blah blah"
|
Posted by Steven, 09-30-2007, 12:57 PM |
apf blocks ips at the iptables level which blocks them completely from your server.
|
Posted by MartynD, 09-30-2007, 01:07 PM |
is it possible to not disable any code them? or would i have to ask them directly.
just a simple "ip blocked, contact blah blah if you think this is a mistake?"
Just thought it would be more user friendly, not to fussed, its just those who cause the server to strain or abuse something will have to go without access to it for a month or two.
|
Posted by Steven, 09-30-2007, 01:29 PM |
Iptables blocks it before it can even get to apache.. so how would it be able to be served? best best is to block it in htaccess instead and not use apf to block it
|
Posted by whmcsguru, 09-30-2007, 03:10 PM |
What Steven has said is correct here. Here's how the connection flow chart works:
IP sends request to server
|
Server uses iptables (typically) to analyze "do I allow or deny"
|
If denied, server immediately kills connection. Nothing, whatsoever can be displayed, researched, shown or anything. It's done, finished.
|
If allowed, content goes through (webpage, mail , etc).
That's the best way it's explained. Not even a blank page will be shown, the system will just not load anything. In firefox that might (note: might) result in a blank page, but that is not coming from the server side at all.
|
Add to Favourites Print this Article
Also Read