Title: Reverse Proxy Issue
Last modified: January 21, 2018

---

# Reverse Proxy Issue

 *  [simplydev](https://wordpress.org/support/users/simplydev/)
 * (@simplydev)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/)
 * 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](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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Freverse-proxy-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/#post-9901420)
 * 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](https://wordpress.org/support/topic/plugin-not-picking-up-actual-user-ip-address-using-webserver-ip-instead/#post-9884016))?
 * 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](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/#post-9922827)
 * This should be fixed in the current beta:
    [https://github.com/yellowtree/wp-geoip-detect/archive/master.zip](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](https://wordpress.org/support/users/simplydev/)
 * (@simplydev)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/#post-9965642)
 * 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](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/#post-9977607)
 * 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.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/reverse-proxy-issue/#post-9977607)
 * Status: not resolved