# GEOIP not honoring REALIP\_MODULE

**URL:** <https://www.ruby-forum.com/t/geoip-not-honoring-realip-module/194177>\
**Category:** NGINX\
**Created:** [August 31, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/geoip-not-honoring-realip-module/194177 "2010-08-31T17:10:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![syle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@syle](https://www.ruby-forum.com/u/syle)\
**Post date:** [August 31, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/geoip-not-honoring-realip-module/194177/1 "2010-08-31T17:10:17Z")

</div>

It is assumed when we use REALIP\_MODULE and purposely set REMOTE\_ADDR to  
real ip of our proxies in front  
that this is the real client IP that GEOIP should be using.

example:  
proxy of nginx in front of a fastcgi nginx.

Proxy config:  
proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For  
$proxy\_add\_x\_forwarded\_for;

Fast cgi config:  
real\_ip\_header X-Real-IP;  
set\_real\_ip\_from x.x.x.x;

This ends up setting REMOTE\_ADDR correctly for Fastcgi nginx server, but  
GEOIP parses information for  
proxy connecting IP instead giving false information.

Posted at Nginx Forum:

> **[GEOIP not honoring REALIP\_MODULE](https://forum.nginx.org/read.php?2,125676,125676#msg-125676)**
>
> It is assumed when we use REALIP\_MODULE and purposely set REMOTE\_ADDR to real ip of our proxies in front that this is the real client IP that GEOIP should be using. example: proxy of nginx in front of a fastcgi nginx. Proxy config: proxy\_set
