Search code examples
apachemagentomod-security

How to Whitelist an IP Address Using Mod_Security


I cannot access my magneto admin panel.I have added below code to .htaccess .syntax code is not working for me.please tell me how to disable the mod_security for my IP address.

syntax code:

SetEnvIfNoCase Remote_Addr ^208.xxx.xxx.103$ MODSEC_ENABLE=Off

**Error : **

Forbidden

You don't have permission to access /manage on this server.


Solution

  • if you decide to do with .htaccess per folder:

    SetEnvIfNoCase Remote_Addr ^208\.xxx\.xxx\.103$ MODSEC_ENABLE=Off
    

    If you decide to do with mod_security.conf per server:

    SecRule REMOTE_ADDR "^208\.xxx\.xxx\.103$" phase:1,nolog,allow,ctl:ruleEngine=Off