Skip to main content

Blocking access to all WordPress sites on a cPAnels erver

Comments

3 comments

  • GoWilkes
    I've been working on something similar. I blocked wp-admin serverwide by creating a .conf file at: /etc/apache2/conf.d/userdata Something like: # exploits.conf RewriteEngine on RewriteCond %{REQUEST_URI} /wp-admin RewriteRule ^ - [F]
    You can add another RewriteCond to allow exceptions based on whatever criteria you like. You can also use CSF's CC_ALLOW_FILTER to block access to the server to the US (which is what I do), but if any of your accounts have non-US customers then it would block them, too.
    0
  • sahostking
    Install CSF which is free and edit the regex.pm file to block access to brute force attacks on the wp-login.php and xmlrpc.php files. Otherwise u might run into issues with plugins or customers trying to access that "path". A ensure at very least you have comodo waf ruleset for modsecurity. That should sort it out
    0
  • cPRex Jurassic Moderator
    The earlier posts are great suggestions!
    0

Please sign in to leave a comment.