GeoIP Legacy not picking up country

#1
Hi

Ive been setting up GeoIP. But OSL does not find any country in the GeoIP database.

Testing the geofile is working correct
geoiplookup /usr/share/GeoIP/GeoIP.dat x.x.x.x
GeoIP Country Edition: DK, Denmark


My test rules, consist of wp block from wiki/documentation:

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^(GB|DK|US|IN)$
RewriteRule (wp-login|xmlrpc).php$ - [F,L]


I have setup behind proxy, therefore:
Use Client IP in Header Trusted IP Only
And this is tested and working, access log shows correct client IP.

But in error.log for the REWRITE output i get the following

2021-04-11 19:57:44.239276 [INFO] [121759] [10.10.10.24:38310#site.com] [REWRITE] Rule: Match '/wp-login.php' with pattern '(wp-login|xmlrpc).php$', result: 2
2021-04-11 19:57:44.239296 [INFO] [121759] [10.10.10.24:38310#site.com] [REWRITE] Cond: Match '' with pattern '^(GB|DK|US|IN)$', result: -1


Therefore no country is working: Cond: Match ''

I am noticing that the log output shows IP 10.10.10.24 - this is the IP of the load balancer, not the browser client.
Could this be?


Attached is a screenshot of my geoip configuration.

Is this a bug - or did i just misconfigure the setup?

Any help appreciated
 

Attachments

Top