IPv6 & IPv4 backend with proxy_bind

Maxim Dounin mdounin at mdounin.ru
Mon Nov 18 13:27:40 UTC 2013


On Mon, Nov 18, 2013 at 10:24:43PM +1030, SplitIce wrote:

> Hi,
> We use proxy_bind to ensure traffic always goes out via the same address as
> the incoming request i.e the bound address where a server has many
> addresses. This is a hard restriction in our use case.
> We are looking to add support for IPv6 backends, we would like to allocate
> a single IPv6 outgoing address per client although this is not a fixed
> restriction at this stage. IPv6 backends may be used in the same upstream
> block as IPv4 addresses (and we encourage this, as some network providers
> are prone to IPv6 related issues).
> We need to be able to maintain our existing system of binding v4 addresses
> while allowing for additional support for ipv6 (it is not possible to use
> IPv6 at all while using a v4 bound address as it will fail with a binding
> error as expected).
> For one we expect to see upstreams such as
> upstream customer_1 {
> server 2001:...:7334
> [...]
> server backup;
> }
> become very common in the near future with the increased adoption of IPv6.
> We have already had several requests for such functionality in the past
> year.

Ok, I see what you are trying to do.  A working solution would be 
to use distinct upstream blocks for ipv6 and ipv4 addresses and an 
error_page based fallback (with proxy_bind configured to 
appropriate addresses in distinct locations).

Given the fact that use of proxy_bind is uncommon by itself, 
and it's use in multi-protocol configuration even more uncommon, I 
tend to think that exisiting solution is good enough.

Maxim Dounin

More information about the nginx-devel mailing list