• I was just reading your .htaccess file to learn a little more about how it’s done. I was looking a little more carefully at it and I noticed that every one of the IPs that’s in the development of the DenyAccess variable is also placed in the in the “deny from” list as a separate item so then what’s the point of the “deny from env=DenyAccess” line if we already have the very same IPs as separate “deny from” entrees. It’s probably just something I don’t understand about .htaccess file yet.

    This is just the first nine entrees of this area of the .htaccess file

    Jim

    # End HackRepair.com Blacklist, http://pastebin.com/u/hackrepair
    SetEnvIF REMOTE_ADDR “^1\.234\.83\.77$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^1\.234\.83\.77$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^1\.234\.83\.77$” DenyAccess

    SetEnvIF REMOTE_ADDR “^2\.94\.151\.162$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^2\.94\.151\.162$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^2\.94\.151\.162$” DenyAccess

    SetEnvIF REMOTE_ADDR “^5\.39\.1\.102$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^5\.39\.1\.102$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^5\.39\.1\.102$” DenyAccess

    SetEnvIF REMOTE_ADDR “^5\.135\.58\.152$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^5\.135\.58\.152$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^5\.135\.58\.152$” DenyAccess

    SetEnvIF REMOTE_ADDR “^5\.135\.43\.153$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^5\.135\.43\.153$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^5\.135\.43\.153$” DenyAccess

    SetEnvIF REMOTE_ADDR “^5\.175\.225\.31$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^5\.175\.225\.31$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^5\.175\.225\.31$” DenyAccess

    SetEnvIF REMOTE_ADDR “^5\.248\.83\.92$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^5\.248\.83\.92$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^5\.248\.83\.92$” DenyAccess

    SetEnvIF REMOTE_ADDR “^8\.37\.226\.155$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^8\.37\.226\.155$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^8\.37\.226\.155$” DenyAccess

    SetEnvIF REMOTE_ADDR “^23\.81\.80\.177$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^23\.81\.80\.177$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^23\.81\.80\.177$” DenyAccess

    order allow,deny
    deny from env=DenyAccess
    deny from 1.234.83.77
    deny from 2.94.151.162
    deny from 5.39.1.102
    deny from 5.135.58.152
    deny from 5.135.43.153
    deny from 5.175.225.31
    deny from 5.248.83.92
    deny from 8.37.226.155
    deny from 23.81.80.177

    https://wordpress.org/plugins/better-wp-security/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey Jim,

    The reason why is that some servers prefer one format over the other and don’t read both. This is a fail safe so all environments are covered.

    Thanks,

    Gerroald

    Thread Starter James Esteban

    (@james-esteban)

    Hi Gerroald:

    Thanks for the info. I guess I’ve just been lucky and haven’t run into one that doesn’t use Allow, Deny.

    Jim

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use of DenyAccess seems redundant to me.’ is closed to new replies.