• Resolved kamoe

    (@kamoe)


    Hi firstly thanks for a superusefull and powerfull plugin!

    My question, as I have dynamic ip etc I’m a bit worried about locking myself out of a site. Now I could disable the plugin by removing it from the plugins folder.. but better yet can I change the ip address in the whitelist in the database? In what table is this data located?

    If not any other option to get back into a site if my location is blocked and my ip is changed?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @kamoe,

    I do not recommend to edit database directly. Instead of it, I’ll introduce some temporary method. I assume that you can edit PHP a file and upload it onto your server using FTP or some file manager like cPanel.

    Please refer to the followings:

    For example, you can add the following snippet into your functions.php or drop-in.php:

    function my_whitelist( $validate, $settings ) {
        // the whitelist of candidate IP addresses
        $whitelist = array(
            '123.456.789.123',
        );
    
        foreach ( $blacklist as $ip ) {
            if ( strpos( $ip, $validate['ip'] ) === 0 ) {
                $validate['result'] = 'passed';
                break;
            }
        }
    
        return $validate;
    }
    add_filter( 'ip-geo-block-login',  'my_whitelist', 1, 2 );
    add_filter( 'ip-geo-block-admin',  'my_whitelist', 1, 2 );

    You can copy drop-in-sample.php in the directory of Geolocation API library to drop-in.php.

    More permanently, I recommend to put IP address with CIDR notation or AS Number of your ISP into the whitelist to specify your dynamically changeable IPs.

    Thread Starter kamoe

    (@kamoe)

    Hi sure I can do this.. great.. I just need some sort of “insurance” in case I can’t get in.

    Really helpfull answer.. how can I support this plugin? Is there a paid version?

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @kamoe,

    Thank you for your offering, but please never mind. I’d love to support my users!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modify whitelist in DB’ is closed to new replies.