• Resolved robyebf

    (@robyebf)


    Hi,
    WP 5.4 php 7.3

    My hosting service uses this script on the server:

    if ( isset( $_SERVER[ “HTTP_X_FORWARDED_FOR” ] ) ) {
    $_SERVER[ ‘REMOTE_ADDR’ ] = $_SERVER[ “HTTP_X_FORWARDED_FOR” ];
    }
    if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’) {
    $_SERVER[‘HTTPS’]=’on’;
    # $_SERVER[ ‘REMOTE_ADDR’ ] = $_SERVER[ “HTTP_X_REAL_FOR” ];
    $_SERVER[ ‘REMOTE_ADDR’ ] = $_SERVER[ “HTTP_X_REAL_IP” ];
    }

    But if I use global options “Use the X-Real-IP HTTP header” the IP does not return anything, if instead I use global options “Use the X-Forwarded-For HTTP header” the returned IP is local 127.0.0.1

    what should I do

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @robyebf

    I would like to have a look at your Wordfence diagnostics report. Please go to the top of the “Diagnostics” tab on the Wordfence “Tools” page. There will be a “SEND REPORT BY EMAIL” button to send the diagnostics report. Enter wftest [at] wordfence [dot] com as the email and @robyebf as the forum username please.

    Once you have emailed me the diagnostics report can you reply here to let me know that it has been sent. This is important in the unlikely event that your installation of WordPress is having an issue with sending mail.

    Thread Starter robyebf

    (@robyebf)

    Hi,
    I sent the mail

    By

    Plugin Support wfphil

    (@wfphil)

    Hi @robyebf

    If you show your hosting provider the output of the IP Detection Methods of detecting a visitor’s IP address section on the Wordfence Tools >> Diagnostics page they will see that their server configuration is broken and that IP detection is not working properly and they can investigate and fix this for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get the ip of user’ is closed to new replies.