Title: cannot get real ip behind reverse proxy
Last modified: July 9, 2017

---

# cannot get real ip behind reverse proxy

 *  Resolved [gatta2](https://wordpress.org/support/users/gatta2/)
 * (@gatta2)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/cannot-get-real-ip-behind-reverse-proxy/)
 * We are using nginx as reverse proxy. Under the general option of GeoIP Detection,
   it shows (With Proxy: [My Real IP], 127.0.0.1 – Without Proxy: 127.0.0.1 – Client
   IP with current configuration: 127.0.0.1). It has detected the IP as 127.0.0.1
   no matter what. I’ve checked phpinfo and X-Forwarded-For has two value in the
   form of REAL IP, 127.0.0.1

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

 *  Thread Starter [gatta2](https://wordpress.org/support/users/gatta2/)
 * (@gatta2)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/cannot-get-real-ip-behind-reverse-proxy/#post-9304158)
 * I want to use geoip_detect2_get_info_from_current_ip(); to find out user’s country
   but it’s not working on our site.
 *  Thread Starter [gatta2](https://wordpress.org/support/users/gatta2/)
 * (@gatta2)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/cannot-get-real-ip-behind-reverse-proxy/#post-9329299)
 * FYI our problem is fixed after changing to the following
 *  // Each Proxy server append their information at the end, so the last IP is 
   most trustworthy.
    $ip = reset($ip_list);
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cannot-get-real-ip-behind-reverse-proxy/#post-9461588)
 * The problem is that I don’t have an UI element for the option “geoip-detect-trusted_proxy_ips”
   yet. But this made me also realize that $trusted_proxies should always include
   localhost. So this will be fixed with the next release.
 * You can try out the beta version if you like:
    [https://github.com/yellowtree/wp-geoip-detect/archive/master.zip](https://github.com/yellowtree/wp-geoip-detect/archive/master.zip)

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

 The topic ‘cannot get real ip behind reverse proxy’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/cannot-get-real-ip-behind-reverse-proxy/#post-9461588)
 * Status: resolved