Allow access only from IP whitelist?

Help
He Shiming
2013-05-02
2013-06-06
  • He Shiming
    He Shiming
    2013-05-02

    I'm planning on putting adminer to the production server. The production server has MySQL installation only available for localhost, and passwords for users.

    Normally, besides username and password authentication, I'd love to configure a whitelist of IPs that are allowed to access this script. If the IP is not in the list, I just return 404. I'm wondering what's the easiest way to do this with adminer.

     
  • Jakub Vrána
    Jakub Vrána
    2013-05-04

    The easiest way is to create a customization, namely with the login() method and return false if remote IP is not in the whitelist.

    Another approach is to create a plugin for this. You can get inspiration in the login-servers plugin.