• Hi, I have an issue on my site, the number (german number) is suppose to change to an Austrian number based on the GeoIP detection plugin, this use to work until the hosting was moved to section.io and moved over to HTTPS. I have a developer that sent me an email explaining, I will quote them below, I hope it means more to you than me.

    “I think you’re in the right part of the code and going in the right direction but my feel is the plugin isn’t doing the right thing. From the plugin settings page (https://www.intrepidtravel.de/wp-admin/options-general.php?page=geoip-detect%2Fgeoip-detect.php) you can see that it is correctly identifying the x-forwarded-for value (my IP is 139.130.141.122) but even though “The server is behind a reverse proxy” is checked it is displaying 35.189.17.20 IP address (i.e. the without proxy address). That feels like a bug with the plugin in that it isn’t taking the config into account correctly. Further diving into the code if you look at the implementation of geoip_detect2_get_client_ip you can see that the author is taking the rightmost value of the x-forwarded-for value (in this case 172.17.0.1 which is the IP of section.io) which I think is also wrong. I would either fork the plugin and push back or just write my own version of the get client ip function.”

    Hope that helps.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Benjamin Pick

    (@benjamin4)

    Hi,

    you need to whitelist all IPs that are part of the hosting structure. This is for security purpose (otherwise it would be ease to forge a client IP). The plugin is using the right-most IP that was not whitelisted. Can you tell me the values of REMOTE_ADDR and X-Forwarded-For (as elaborated here)?

    Quoting from Wikipedia (X-Forwarded-For):
    “Since it is easy to forge an X-Forwarded-For field the given information should be used with care. The last IP address is always the IP address that connects to the last proxy, which means it is the most reliable source of information.”

    As I often get support request regarding the reverse proxy part, I will add a plugin page for debugging & configuring this. Until then, you need to put it in the options manually.

    Benjamin Pick

    (@benjamin4)

    This should be fixed in the current beta:
    https://github.com/yellowtree/wp-geoip-detect/archive/master.zip

    I will release it when my new reverse proxy debug panel is finished.

    Thread Starter simplydev

    (@simplydev)

    Hi Benjamin,

    Sorry for the delay in getting back to you on this, I have been away.

    I have uploaded the new files as linked above and still having the issues, do you have a timeline for when the debug panel will be released?

    Thanks

    Benjamin Pick

    (@benjamin4)

    Did you also check the “using reverse proxy” option?

    There is no timeline, I will continue to do it when I come to it …

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Reverse Proxy Issue’ is closed to new replies.