Subject: Re: [vserver] IPv6 in dualstack breaks IPv4 loopback virtualisation
From: cryptronic <mail@cryptronic.de>
Date: Thu, 09 Sep 2010 19:45:21 +0200

Hi,

# vserver-info
Versions:
                    Kernel: 2.6.35.4-vs2.3.0.36.32-netcup
                    VS-API: 0x00020306
              util-vserver: 0.30.216-pre2883; Aug  6 2010, 15:54:18

Am 09.09.2010 19:17, schrieb Bruno Prémont:
> Hi Oliver,
>
> You mean that enabling IPv6 causes your apache (on host or inside guest?)
> to see the guests real address?
>
> My best bet, if without IPv6 it doesn't happen is that your apache is
> listening on a mixed (IPv4&  IPv6)-any socket and over most of the place
> the IPv4 localhost address of your wget is stored as IPv6 mapped IPv4
> address and thus forgotten to get rewritten back to 127.0.0.1.
>    

This was also my thougths about that. When the rewrite does not happen 
i'm having dual stack sockets for apache.

> Could you tell us which kernel+patch version you are using and if letting
> apache listen on IPv4-only and IPv6-only sockets makes wget's IP address
> show up as expected?
>    

If i'm using ipv6 only socket:

1. IPv6 only:

Listen [::]:80
127.27.114.1 - - [09/Sep/2010:17:42:08 +0000] "GET / HTTP/1.0" 200 45 
"-" "Wget/1.11.4"

2. IPv4 only:

Listen 0.0.0.0:80
127.0.0.1 - - [09/Sep/2010:16:59:06 +0000] "GET / HTTP/1.0" 200 45 "-" 
"Wget/1.11.4"

3. IPv4 and IPv6 on different sockets:
Listen 0.0.0.0:80
Listen [::]:80
127.27.114.1 - - [09/Sep/2010:17:43:42 +0000] "GET / HTTP/1.0" 200 45 
"-" "Wget/1.11.4"

4. IPv4 and IPv6 on same socket:
Listen 80
127.27.114.1 - - [09/Sep/2010:16:57:07 +0000] "GET / HTTP/1.0" 200 45 
"-" "Wget/1.11.4"

best regards

Oliver