# NGI proxy from ipv6 to ipv4

**URL:** <https://www.ruby-forum.com/t/ngi-proxy-from-ipv6-to-ipv4/206037>\
**Category:** NGINX\
**Created:** [April 21, 2011, 12:35am UTC](https://www.ruby-forum.com/t/ngi-proxy-from-ipv6-to-ipv4/206037 "2011-04-21T00:35:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 21, 2011, 12:35am UTC](https://www.ruby-forum.com/t/ngi-proxy-from-ipv6-to-ipv4/206037/1 "2011-04-21T00:35:41Z")

</div>

Hi all

I have several web servers (FreeBSD+nginx+php-fpm)  
on 172.16.10.0/24 private network.

I pass all ipv4 public traffic from nginx servrer with 2 nic  
(one on inside and one on outside)

Can nginx pass also ipv6 traffic to ipv4 private ips?

kind regards

Posted at Nginx Forum:

> **[NGI proxy from ipv6 to ipv4](https://forum.nginx.org/read.php?2,192683,192683#msg-192683)**
>
> Hi all I have several web servers (FreeBSD+nginx+php-fpm) on 172.16.10.0/24 private network. I pass all ipv4 public traffic from nginx servrer with 2 nic (one on inside and one on outside) Can nginx pass also ipv6 traffic to ipv4 private ips

---

<div class="post-metadata">

**Author:** ![bsd3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@bsd3000](https://www.ruby-forum.com/u/bsd3000)\
**Post date:** [April 21, 2011, 1:15am UTC](https://www.ruby-forum.com/t/ngi-proxy-from-ipv6-to-ipv4/206037/2 "2011-04-21T01:15:15Z")

</div>

Hello!

On Wed, Apr 20, 2011 at 06:34:58PM -0400, bsd3000 wrote:

> Hi all
> 
> I have several web servers (FreeBSD+nginx+php-fpm)  
> on 172.16.10.0/24 private network.
> 
> I pass all ipv4 public traffic from nginx servrer with 2 nic  
> (one on inside and one on outside)
> 
> Can nginx pass also ipv6 traffic to ipv4 private ips?

Yes. You have to compile nginx with ipv6 support (./configure  
–with-ipv6, IPV6 option in port) and configure listen sockets on  
appropriate ipv6 addresses, e.g.

```
server {
    listen 80;
    listen [::]:80;

    location / {
        proxy_pass http://backends;
    }
}

```

Maxim D.
