NAT46 support example


#1

Does HA proxy support NAT46? trying to reach a v6 server from a v4 address space.
Does anyone have an example?


#2

A different address-family is not a problem, just configure it as every other configuration. Both that’s not really a NAT46, or any NAT for that matter, haproxy works with sockets, and they can be of different address-families.

Depending on your actual use-case, haproxy may or may not be the right tool for the job. If you want to place a dual-stacked reverse proxy in front of your backend server that are v6 only, then yes, haproxy will do that just fine.

But if you need a forward proxy, then there are probably better tools for the job.


#3

what I am trying to achieve is this:

  • use haproxy in frontend as ipv4 and backend as ipv6
  • as such the frontend get a packet with SIPv4, DIPv4 (haproxy socket)
  • the backend has a v6 server address, but the SIPaddress the HAproxy should use is a v4mapped ipv4 address using the SIPv4 coming from the incoming packet and map it to a NAT46prefix.

I am wondering if this is possible with haproxy


#4

Haproxy is not a router and it’s not a NAT46 gateway. Generally NAT46 is a solution that you’d put at the eyeballs side of things, not in front of servers.

However, haproxy will do the job of translating between v4 customers and your v6 backends just fine, by sending the IPv4 source address either as X-Forwareded-For header in the HTTP header, or with the proxy protocol.

But it isn’t a NAT46 gateway.


#5

Ok I used the Haproxy as a true proxy without NAT64. Thanks for all replies