Iptables – Use iptables to forward ipv6 to ipv4

iptablesport-forwarding

Currently I have a setup where, due to configuration that would take forever to fix, I have a server that can only be accessed by ipv4. I also, however, have a server that can be accessed by ipv6.
I was wondering if I could use iptables to forward ipv6 traffic on a certain port from one of the servers to another server using ipv4 traffic.

Best Answer

IPtables cannot currently do this, so you need a userspace process to proxy the connections. socat is a suitable tool for this:

socat TCP6-LISTEN:1234,fork TCP4:1.2.3.4:1234
Related Topic