NGI proxy from ipv6 to ipv4

Maxim Dounin mdounin at
Thu Apr 21 03:14:32 MSD 2011


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

> Hi all
> I have several web servers (FreeBSD+nginx+php-fpm)
> on 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 Dounin

More information about the nginx mailing list