# Enabled ipv6. Now ipv4 IP's are logged differently

**URL:** <https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108>\
**Category:** NGINX\
**Created:** [May 29, 2012, 10:15am UTC](https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108 "2012-05-29T10:15:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [May 29, 2012, 10:15am UTC](https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108/1 "2012-05-29T10:15:33Z")

</div>

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:

> **[Enabled ipv6. Now ipv4 IP's are logged differently](https://forum.nginx.org/read.php?2,226955,226955#msg-226955)**
>
> 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

---

<div class="post-metadata">

**Author:** ![Evert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@Evert](https://www.ruby-forum.com/u/Evert)\
**Post date:** [May 29, 2012, 10:20am UTC](https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108/2 "2012-05-29T10:20:31Z")

</div>

On Tue, May 29, 2012 at 9:15 AM, Evert [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Before:  
> 109.247.15.146
> 
> Now:  
> ::ffff:109.247.15.146
> 
> Is this… a bug? a feature? Expected behaviour?

See “dotted-quad notation”:

> **[IPv6 address](https://en.wikipedia.org/wiki/IPv6_address#Presentation)**
>
> An Internet Protocol version 6 address (IPv6 address) is a numeric label that is used to identify and locate a network interface of a computer or a network node participating in a computer network using IPv6. IP addresses are included in the packet header to indicate the source and the destination of each packet. The IP address of the destination is used to make decisions about routing IP packets to other networks. IPv6 is the successor to the first addressing infrastructure of the Internet, Inte...

---

<div class="post-metadata">

**Author:** ![Evert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@Evert](https://www.ruby-forum.com/u/Evert)\
**Post date:** [May 29, 2012, 10:55am UTC](https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108/3 "2012-05-29T10:55:58Z")

</div>

Thanks, Maxim. That solved my issues! 🙂

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

Posted at Nginx Forum:

> **[Re: Enabled ipv6. Now ipv4 IP's are logged differently](https://forum.nginx.org/read.php?2,226955,226959#msg-226959)**
>
> 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

---

<div class="post-metadata">

**Author:** ![Evert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@Evert](https://www.ruby-forum.com/u/Evert)\
**Post date:** [May 29, 2012, 10:33am UTC](https://www.ruby-forum.com/t/enabled-ipv6-now-ipv4-ips-are-logged-differently/220108/4 "2012-05-29T10:33:33Z")

</div>

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.
