Welcome! Log In Create A New Profile

Advanced

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Maxim Dounin
May 13, 2011 12:46PM
Hello!

On Fri, May 13, 2011 at 05:05:02PM +0200, Matthias Saou wrote:

> I just enabled IPv6 on some web servers running nginx, and the $geoip_*
> variables all broke for existing IPv4 traffic.
>
> This seems to be because when not changing the net.ipv6.bindv6only
> sysctl value to 1 on Linux, choosing to "listen [::]:80" has nginx
> automatically work for IPv4 connections, but receiving source IP
> addresses as IPv4-Mapped IPv6 addresses :
>
> Before the listen change : 192.168.38.87
> After the listen change : ::ffff:192.168.38.87
>
> Lots of details are in rfc4291, rfc4038 (and surely others), but I
> think that this configuration should be gracefully handled by the GeoIP
> module.
>
> This was tested with nginx 1.0.2 on Red Hat Enterprise Linux 5 x86_64.

Right now geoip module doesn't support ipv6. Please note that
you've not "enabled ipv6" but rather moved your server to ipv6 as
a whole.

> A workaround is to change net.ipv6.bindv6only to 1 and have two
> different listen directives as "80" and "[::]:80" for all "server"
> sections, but that would be best avoided just to fix this.

The same may be done at nginx level with "listen ... ipv6only=on".

Maxim Dounin

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

GeoIP module breaks for IPv4 when IPv6 is enabled

Matthias Saou 2360 May 13, 2011 11:06AM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Maxim Dounin 868 May 13, 2011 12:46PM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Igor Sysoev 890 May 13, 2011 02:16PM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Igor Sysoev 889 May 13, 2011 02:40PM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Matthias Saou 793 May 13, 2011 06:00PM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Maxim Dounin 741 May 16, 2011 06:42AM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Igor Sysoev 889 May 16, 2011 06:46AM

Re: GeoIP module breaks for IPv4 when IPv6 is enabled

Maxim Dounin 1031 May 16, 2011 07:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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