Welcome! Log In Create A New Profile

Advanced

Re: Enabled ipv6. Now ipv4 IP's are logged differently

Maxim Dounin
May 29, 2012 04:32AM
Hello!

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

> 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?

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 Dounin

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

Enabled ipv6. Now ipv4 IP's are logged differently

Evert May 29, 2012 04:15AM

Re: Enabled ipv6. Now ipv4 IP's are logged differently

Tiberius May 29, 2012 04:22AM

Re: Enabled ipv6. Now ipv4 IP's are logged differently

Maxim Dounin May 29, 2012 04:32AM

Re: Enabled ipv6. Now ipv4 IP's are logged differently

Evert May 29, 2012 04:55AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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