IP Address Deny Manager - broken

-moO-

Member
Feb 17, 2015
5
0
1
cPanel Access Level
Root Administrator
Hi,

whenever I access our cpanel server's IP Address Deny Manager page it states:
"You have not blocked any IP addresses."

This is all good and well except for the fact that I have added at least 10 IPs to the list that are actively being blocked.

Is there a way to fix this?

Thanks,

-moO-
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

My initial thought is that your account's .htaccess file located at the path below includes some broken entries:

Code:
/home/$username/public_html/.htaccess
The IP Blocker feature in cPanel blocks the IP addresses by inserting them with a deny rule into this file, and this tells Apache which IP addresses to deny access from. However, often times users will manually add their own custom rules to the .htaccess file, or sometimes custom rules are added automatically when installing an application such as WordPress or Joomla. These rules are sometimes inserted in an incorrect format, which can prevent the IP Blocker feature in cPanel from obtaining a list of previously blocked IP addresses. Do you have root access to this server? If so, you can run the following command while opening the IP Blocker feature in your browser to see if any errors show up:

Code:
tail -f /usr/local/cpanel/logs/error_log
Do you notice any errors showing up the moment you access the feature from within cPanel? If so, could you paste them into this thread, ensuring to remove any real domain names and IP addresses?

Thank you.
 

-moO-

Member
Feb 17, 2015
5
0
1
cPanel Access Level
Root Administrator
Hi Michael,

looks like you've shed the proper light on this quandary.

Our /home/username/public_html/.htaccess file contains the following, which seems to not play nice with the IP Blocker:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^url.com [NC]
RewriteRule ^(.*)$ http://www.url.com/$1 [L,R=301]

suPHP_ConfigPath /home/username/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

By the way, there were no errors in the error_log.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Our /home/username/public_html/.htaccess file contains the following, which seems to not play nice with the IP Blocker:
To clarify, does the option work properly when temporarily removing the existing entries from the .htaccess file?

Thank you.