IPv6 to IPv4 on OpenWRT for services? Network?

Hi everyone,

I'm working on converting IPv6 to IPv4 and vice versa on my OpenWRT Router to simplify my setup. My Raspberry Pi, running services via Docker, connects to the OpenWRT Router via LAN.

To streamline things, I'm attempting to redirect incoming packets for my Pi's services (e.g., Port 30000) to IPv4. This could potentially resolve compatibility issues with Docker and IPv4, especially since I prefer not to use IPv6 for Pi's services, if it's not necessary.

I've tried the following without success:

ip6tables -t nat -A PREROUTING -p tcp --dport 21116 -j DNAT --to-destination
socat TCP6-LISTEN:21116,fork TCP4:

I'm setting up a RustDeskServer and facing issues, possibly due to IPv6. I prefer internal IPv4 with outgoing traffic reverting to IPv6 because of my DS-Lite connection.

Any guidance or suggestions would be appreciated.

Thanks in advance!

It is not as simple as you are trying with iptables. :stuck_out_tongue:
Take a look at NAT64 and DNS64

Ah ok! Thanks!

1 Like