IP Deny Manager Circumvention


New Member
Hi everyone,

I have one cPanel account which hosts a small private forum. Like all Forums on the net, it attracts would-be spammers. I have used the IP Deny Manager to block large ranges of IP addresses from even trying to access the forum area.

Recently, I have started noticing that IP addresses make it to the forum where they are also banned from signing up or posting. I would have assumed that any IP address range covered by the IP Deny Manager would never get that far but I continue to see these denied IP addresses in my server logs.

Can someone point me to more information on how the IP Deny Manager might be being circumvented? Is there something more I should do to truly block the IP ranges I wish banned?

Thanks, ppc.

Here is a little more information regarding what I am seeing.

A couple of months ago, I started seeing a large number of accesses to the forum from IP addresses in the 195.*.*.* range (as one of many examples). Most of these were likely the result of spambots trying to join the forum. Since all members are moderated and must be local to the club, these were always denied. I tired of having to handle them manually so used the forum software configuration to ban registration from all addresses from that range.

Then I started getting automated DOS style attacks from that IP range where they would hit the server will requests every second or so (sometimes coming faster) for extended periods. I decided to use the IP deny manager to keep these from ever reaching the forum software -- or so I thought.

Using the IP deny manager, I denied access from "195." which showed as banning to and the following entry was made by the IP Deny Manager into the .htaccess file of the root of the Web site.

=== .htaccess ===
<Files 403.shtml>
order allow,deny
allow from all

deny from 195.

The directive looks a bit odd to me but this is what the CPANEL IP Deny Manager created... (I would have expected the </files> to follow the list of denied ranges but that's not what the IP Deny manager did. Still, it seems to be sort of working most of the time.)

So, the problem I am having is that the forum software continues to trap and log registration attempts from addresses in the 195.*.*.* range. I would think those accesses would never make it to the forum software and would be blocked by the Apache server via the .htaccess directives. I would have thought such addresses should never appear in the server logs, yet they do. It is as if **some but not all** accesses from this range are getting through anyway.

The question this raises is how requests within the IP Deny Manager's banned range are making it past the Apache .htaccess directives and getting caught by the forum software.

Are there known methods that spammers are using to bypass the Apache directives? What might I try to do to lock out nuisance accesses from these IP ranges I wish to completely disallow?
Hello John,

I don't know how KH has the reseller accounts set up but I know that depending on configuration sometimes .htaccess files will only work for that directory and not for the ones beneath it. And it will also depend on configuration as to whether or not Apache will read .htaccess files in subdirectories also.

Beyond that it would be better to use IPtables to block IP addresses and it will do this for your entire account. The firewall that PPC recommended works directly with IPtables and allows you to either let it manage addresses that get blocked (it goes through log files and adds them) and you can also add addresses manually. I would assume that you can install it into your reseller account just fine although if you are reluctant to do so you can always ask KH support to do it for you. There is a great deal of installation, configuration, and information at the website that PPC posted for you in addition to user forums.

Hope that helps