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.

WHM Returning 401 errors due to Host Access Control

Discussion in 'Security' started by Brad Groux, Jan 22, 2013.

  1. Brad Groux

    Brad Groux Registered

    Joined:
    Aug 27, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    It seems I made a rookie mistake and screwed up my host access control list somehow from within WHM. I added three IP addresses with ALL/DENY in the HAC, and now I receive "HTTP error 401 You do not have permission to access this page" errors anytime I click on a link in the menu of WHM.

    The IP addresses I added were in my stats as people trying to run PHPMyAdmin exploit scripts... and I know I didn't add myself because my router has an IPv6 IP. I've also tried connecting with my phone's internet sharing with the same results.

    How can I clear the entries in HAC from the shell?

    I obviously realize now I should be blocking IPs via iptables.

    Thanks
     
    #1 Brad Groux, Jan 22, 2013
    Last edited: Jan 22, 2013
  2. Greenhost

    Greenhost Well-Known Member

    Joined:
    Jan 22, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I think you have dedicate server, you should rescue or ask for KVM from your Data center.
     
  3. Brad Groux

    Brad Groux Registered

    Joined:
    Aug 27, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    It is a VPS running CentOS with cPanel. I have root access.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. Brad Groux

    Brad Groux Registered

    Joined:
    Aug 27, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    That worked, fantastic! THANKS!
     
  6. zemon

    zemon Registered

    Joined:
    Mar 5, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have the same issue, I restricted all connections through SSH,WHM,Cpanel to my IP address but now my internet has been down and I can only access through a different IP address.

    Should I just clear the files hosts.deny and hosts.allow?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    If you have access to the /etc/hosts.allow file, yes, update it to reflect your new IP address.

    Thank you.
     
Loading...

Share This Page