Welcome! Log In Create A New Profile

Advanced

Re: Spoof IP for geoip plugin?

September 13, 2010 04:40AM
On Mon, Sep 13, 2010 at 09:34:26AM +0100, Phillip Oldham wrote:

> Is there a way I can spoof my local IP when testing nginx's geoip
> plugin? I'm running a VM which has a static IP on my local network which
> runs a development version of my app sitting behind nginx. I need to
> test that the right geoip headers are being passed to my app, but since
> I'm on a local network my ip isn't set in the geoip.dat file.

You shoul built nginx --with-http_realip_module, then add trusted client
address in the confguration:

set_real_ip_from 127.0.0.1;

and make requests with the header line:

X-Real-IP: 1.1.1.1


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Spoof IP for geoip plugin?

Phillip Oldham September 13, 2010 04:38AM

Re: Spoof IP for geoip plugin?

Igor Sysoev September 13, 2010 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 239
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