how to allow access through only a few IPs? (3 posts)

  1. huwang
    Posted 2 years ago #

    Thanks for this plugin so that I don't have to deal with the .htaccess file.

    Got a question though that I want to limit access to a list of IPs, I setup blacklist as *.*.*.* and whitelist as the IPs allowed. But it seems that only admin IP can access the site after then. What can I do for this?



  2. jamiewilson
    Plugin Author

    Posted 2 years ago #

    That's actually a situation I hadn't anticipated. You're coming at access permissions from the opposite approach of most WordPress sites--"deny all but allow these" instead of "allow all but deny these." Right now, Gatekeeper's black list prioritizes the black list (presuming anything on that list is ultimately bad and overriding the white list if an IP matches both) and blocks those IP addresses.

    Your approach is intriguing and I can see it being useful. For ultimate security, I'd still recommend relying on .htaccess since it's closer to the server and less prone to quirks in PHP, WordPress, Gatekeeper, etc.

    Let me give this some thought on how I might be able to best implement what you're asking. Most likely it would be an option of "whitelist priority" vs "blacklist priority." I can't promise a quick update, but I like the idea and it'll probably be something I push in the next update. If you have suggestions, please pass them along.

  3. huwang
    Posted 2 years ago #

    Thank you very much. I guess to complete gatekeeper, you probably can add an option for user to select which list is in priority - black or white so that you can easily achieve the above functionality.

    I ended up with .haccess for now. But hope to apply your plugin for this purpose.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gatekeeper
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.