The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IP Address Deny Manager - broken

Discussion in 'General Discussion' started by -moO-, Apr 29, 2016.

Tags:
  1. -moO-

    -moO- Member

    Joined:
    Feb 17, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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-
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. -moO-

    -moO- Member

    Joined:
    Feb 17, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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.
     
    #3 -moO-, May 2, 2016
    Last edited: May 3, 2016
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To clarify, does the option work properly when temporarily removing the existing entries from the .htaccess file?

    Thank you.
     
Loading...

Share This Page