Skip to main content

Blocking IPs fail

Comments

5 comments

  • cPanelMichael
    Hello, Could you ask your hosting provider to let us know of any output to /usr/local/cpanel/logs/error_log when using the "IP Blocker" option to add a new blocked IP? Also, what are the permissions/ownership values on the account's .htaccess file? Thank you.
    0
  • panit
    There aren't any errors in that log and the permissions are -rw-r--r--. I tried adding my own IP via IP Deny Manager to test for errors and found that I wasn't blocked. But I noticed that cpanel only adds the line deny from IP# to the .htaccess file. So I removed all of the , order... and allow from statements, leaving only deny from statements and all of the blocking started working. As a test, I added this: deny from my IP order deny, allow deny from some other IP allow from all The above allowed me to view the site. Changing the above to the following blocked me again. deny from my IP deny from some other IP Are those commands no longer valid? Or is there some module that needs to be installed in this version of apache/cpanel that isn't done automatically?
    0
  • rpvw
    You might like to try the apache 2.4 method eg Require all granted Require not ip 10.252.46.165
    That should block access from 10.252.46.165 and allow everyone else. I have had mixed success using these newer formats (but it was probably my fault for getting syntax wrong) More details from Access Control - Apache HTTP Server Version 2.4
    0
  • cPanelMichael
    Hello, Feel free to have your hosting provider open a support ticket with us using the following URL: Create Support Ticket - Version 68 Documentation - cPanel Documentation This will allow us to take a closer look at the system to verify why it's not blocking the IP addresses. Thank you.
    0
  • panit
    This appears to be working now. There was a notice in WHM saying a reboot was needed to apply changes from the last update. Once that was done, the problem went away. No way to know if it was due to some setting in cpanel not being applied or just something hung up on the server, though the latter is probably correct. My thanks for the help and apologies for wasting time on this.
    0

Please sign in to leave a comment.