• Don’t really know what I’m doing, as will quickly become obvious…

    When IP/country blocking stopped working, I tried adding more security plugins. (I know, bad idea, but I’m insecure.) Blocking is now working pretty well. Currently active are AIOWPS, iThemes, WP Security, WP Cerber, IQ Block Country, Limit Login Attempts, and I deactivated IP Geo Block. Seems like each of these offers different features, but if more experienced users can advise me (on forum or by PM) which might be redundant, I’ll remove them.

    Meanwhile, my .htaccess file is huge, about 240 kB, ca. 7500 lines. (Seems to slow front-end loading, and back-end access always takes two refreshes.) There are three lists of the same blocked IPs and IP ranges that to me look like redundant information, perhaps added in different structures by different plugins. Example:

    #AIOWPS_DEBUG_LOG_BLOCK_HTACCESS_RULES_END
    #AIOWPS_DISABLE_INDEX_VIEWS_START
    Options -Indexes
    #AIOWPS_DISABLE_INDEX_VIEWS_END
    #AIOWPS_IP_BLACKLIST_START
    <IfModule !mod_authz_core.c>
    Order allow,deny
    Allow from all
    Deny from 103.12.211.176

    </IfModule>
    <IfModule mod_authz_core.c>
    <RequireAll>
    Require all granted
    Require not ip 103.12.211.176

    # Ban Hosts – Security > Settings > Banned Users
    SetEnvIF REMOTE_ADDR “^103\.12\.211\.176$” DenyAccess
    SetEnvIF X-FORWARDED-FOR “^103\.12\.211\.176$” DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP “^103\.12\.211\.176$” DenyAccess

    <IfModule mod_authz_core.c>
    <RequireAll>
    Require all granted
    Require not env DenyAccess
    Require not ip 103.12.211.176

    </RequireAll>
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order allow,deny
    Allow from all
    Deny from env=DenyAccess
    Deny from 103.12.211.176

    Could I safely delete all but one of these lists?

    Thanks very much

  • The topic ‘Redundant IP blocks in .htaccess?’ is closed to new replies.