Enabled ipv6. Now ipv4 IP's are logged differently

Hi all,

I’ve enabled IPv6 support on my Nginx setup, but for some reason that
has changed the format in which IPv4 addresses are logged…

Before:
109.247.15.146

Now:
::ffff:109.247.15.146

Is this… a bug? a feature? Expected behaviour?

greetings,
Evert

Posted at Nginx Forum:

On Tue, May 29, 2012 at 9:15 AM, Evert [email protected] wrote:

Before:
109.247.15.146

Now:
::ffff:109.247.15.146

Is this… a bug? a feature? Expected behaviour?

See “dotted-quad notation”:

Thanks, Maxim. That solved my issues! :slight_smile:

(and a thanks to Tiberius for the info as well :slight_smile: )

Posted at Nginx Forum:

Hello!

On Tue, May 29, 2012 at 04:15:02AM -0400, Evert wrote:

Is this… a bug? a feature? Expected behaviour?

It looks like you’ve aren’t enabled ipv6 support, but completely
switched to ipv6 instead. And now you see all ipv4 connections as
ipv4-mapped ipv6 ones.

To preserve ipv4 as is use explicit listen sockets on ipv4 and
ipv6, i.e.

listen 80;
listen [::]:80 ipv6only=on;

(the “ipv6only=on” flag is required if your system by default
tries to handle both ipv6 and ipv4 with ipv6 sockets, and doesn’t
allow ipv4 socket to coexist with it; i.e. it’s required on most
Linux systems)

Maxim D.