Welcome! Log In Create A New Profile

Advanced

GeoIP FirstNonPrivateXForwardedForIP

June 12, 2014 12:36PM
Hi,

My website does country based redirection based on result obtained from GeoIP against IP.

I am facing a problem where GeoIP does not work as first IP in the X-Forwarded-For has Private network address. (Say 192.168.1.1)

I know GeoIP on private network would fail but the X-Forwarded-For also has the public IP along with Private IP.

Eg : 192.168.1.1, 115.97.213.63 - - [Timezone] ......

In some cases where multiple proxies are involved it would show :

192.168.1.1, 115.97.213.63, 115.97.213.12 - -

I want GeoIP should be done on the first non private ip. I could achieve this in apache using GeoIP module directive called "FirstNonPrivateXForwardedForIP"

How to do this in nginx ?

Kindly suggest

Regards,
Keyur
Subject Author Posted

GeoIP FirstNonPrivateXForwardedForIP

Keyur June 12, 2014 12:36PM

RE: GeoIP FirstNonPrivateXForwardedForIP

Lukas Tribus June 12, 2014 01:12PM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Keyur June 16, 2014 01:17AM

RE: GeoIP FirstNonPrivateXForwardedForIP

Lukas Tribus June 16, 2014 03:14AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Keyur June 16, 2014 03:19AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Keyur June 23, 2014 02:57AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Jonathan Matthews June 23, 2014 06:32AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Keyur June 23, 2014 07:05AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

Steve Wilson June 23, 2014 07:18AM

RE: GeoIP FirstNonPrivateXForwardedForIP

Lukas Tribus June 23, 2014 08:32AM

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

wandenberg July 31, 2014 10:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready