• Hello,

    Just a couple of weeks ago, the website started showing its server’s IP as the IP of every Identified user in the “Fingerprints” section.

    I contacted the hosting company to know what is causing it, and they said that there were some global changes made to Nginx and OHWP servers that might have affected how the plugin obtains users’ IPs. They said I would need to change the method in which IPs are obtained on the plugin’s settings page …but there is no way to do this in the setting options, correct?

    The support staff also stated the following: “The nginx configuration is set to display the real IP of the visitor. I’m not sure how the plugin developer pulls the data.”

    Based on their investigation of the issue, they were able to narrow the problem down to the manner in which IPs are being pulled.

    Which method does the plugin use to obtain IPs?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michal Jaworski

    (@upsell)

    Hi @melodies,

    The IP is fetched in the following way:

    function get_user_ip() {
    	$ipaddress = '';
    	if ( isset( $_SERVER[ 'HTTP_CLIENT_IP' ] ) ) {
    		$ipaddress = $_SERVER[ 'HTTP_CLIENT_IP' ];
    	} else if ( isset( $_SERVER[ 'HTTP_X_FORWARDED_FOR' ] ) ) {
    		$ipaddress = $_SERVER[ 'HTTP_X_FORWARDED_FOR' ];
    	} else if ( isset( $_SERVER[ 'HTTP_X_FORWARDED' ] ) ) {
    		$ipaddress = $_SERVER[ 'HTTP_X_FORWARDED' ];
    	} else if ( isset( $_SERVER[ 'HTTP_FORWARDED_FOR' ] ) ) {
    		$ipaddress = $_SERVER[ 'HTTP_FORWARDED_FOR' ];
    	} else if ( isset( $_SERVER[ 'HTTP_FORWARDED' ] ) ) {
    		$ipaddress = $_SERVER[ 'HTTP_FORWARDED' ];
    	} else if ( isset( $_SERVER[ 'REMOTE_ADDR' ] ) ) {
    		$ipaddress = $_SERVER[ 'REMOTE_ADDR' ];
    	}
    
    	return filter_var( $ipaddress, FILTER_VALIDATE_IP );
    }

    Regards
    Michal

    Thread Starter melodies

    (@melodies)

    Hi @upsell,

    Thank you for your reply.

    Please how can I set the plugin to obtain the visitor’s real IP with “HTTP_X_REAL_IP”?

    The plugin seems to have a conflict with the new nginx configuration, and every visitor’s IP is showing up as the same.

    Plugin Author Michal Jaworski

    (@upsell)

    Hi @melodies,

    Currently you can only modify this part of code to obtain such effect. We can add the filter on the returned value in future versions.

    Thread Starter melodies

    (@melodies)

    Hi @upsell

    Okay, I will look forward to it in future versions. Thank you.

    /* Allows IP to be passed from remote host to server */
    if (isset($_SERVER[“HTTP_X_REAL_IP”]))
    $_SERVER[“REMOTE_ADDR”] = $_SERVER[“HTTP_X_REAL_IP”];

    Hello @upsell,

    Thank you for creating this plugin ??

    When will the filter on the returned value update be available, as mentioned in the post above?

    I would like see visitors Real IP in the Fingerprint section because the Fingerprint section is currently showing my own nginx server IP for all visitors, rather than each visitor’s Real IP. This is causing some visitor activity to get mixed up since everyone is showing the same IP.

    I would really appreciate it. Thanks!

    Plugin Author Michal Jaworski

    (@upsell)

    Hi @maratalton,

    Soon ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘IP Fingerprint Issue’ is closed to new replies.