2

Following the post:

https://magento.com/security/best-practices/protect-your-magento-installation-password-guessing-new-update

I am not able to whitelist two public IPs of mine, while blocking other IPs for Magento admin panel. I have custom path set up for admin panel.

I have tried both:

# Whitelist an IP address for the admin panel
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteRule ^(index.php/)?admin/ - [L,R=403]

and:

# Whitelist an IP address for the admin panel
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteRule ^(index.php/)?custom-path-to-admin/ - [L,R=403]

But none of them seem to work, am I missing anything? (obviously xx.xx.xx.xx have been replaced with my public IP).

4
  • 1
    Actually if you read carefully they are NOT the same.
    – Antony
    Nov 10, 2016 at 16:20
  • True that my bad, close vote retracted ;) Nov 10, 2016 at 16:23
  • is your ip correctly identified by the server?
    – MagenX
    Nov 11, 2016 at 8:01
  • What do you mean by "correctly identified by the server"? I am sure the IP I put in there is correct.
    – Antony
    Nov 12, 2016 at 13:23

1 Answer 1

0

if your running your site over SSL "HTTPS", this will not work if mod_rewrite is not enabled on your server-ssl configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.