• Hi,

    Your code doesn’t set IP address when behind a Reverse Proxy

    To get this done :

    diff wp-content/plugins/wps-limit-login/classes/plugin.php wp-content/plugins/wps-limit-login/classes/plugin.php_modif
    1017a1018
    >               /*
    1019a1021,1024
    >               }
    >                */
    >               if ( isset( $_SERVER[$this->get_option( 'wps_limit_login_client_type' )] ) ) {
    >                       return $_SERVER[$this->get_option( 'wps_limit_login_client_type' )];

    Thanks to put this in your code,

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Akseli Palén

    (@akselipalengmailcom)

    I also have problems with the reverse proxy setup. The plugin thinks that all the login attempts are coming from the same IP – the reverse proxy. Therefore I cannot access my site control panel because the constant brute-force login attempts.

    Thread Starter jadjay

    (@jadjay)

    Would you be so kind to review this piece of code please?

    Hello @jadjay, i don’t understand where to put your code in file plugin.php.

    What is the function ?
    Is it a replacement or an addition ?

    Thks for you reply and hope it will fix officialy in the plugin.

    Thread Starter jadjay

    (@jadjay)

    Hello @bnbc,

    You need to learn how to use diff

    Lines 1017 to 1024

    As this plugin isn’t updated, the lines are corrects.

    Thread Starter jadjay

    (@jadjay)

    Ok @bnbc I’ll help you

    
    $ cat > ~/patch <<EOF
    1017a1018
    >               /*
    1019a1021,1024
    >               }
    >                */
    >               if ( isset( $_SERVER[$this->get_option( 'wps_limit_login_client_type' )] ) ) {
    >                       return $_SERVER[$this->get_option( 'wps_limit_login_client_type' )];
    EOF
    

    then cd to your root directory

    
    $ cp wp-content/plugins/wps-limit-login/classes/plugin.php wp-content/plugins/wps-limit-login/classes/plugin.php_orig # save the original file for security
    $ patch wp-content/plugins/wps-limit-login/classes/plugin.php ~/patch
    

    That’s done.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Behind reverse proxy’ is closed to new replies.