NAT IPv6 to IPv4

Hello!
I have a question about the configuration of RouterOS.

I have an application which currently only supports IPv4.
This runs on my network and should be publicly accessible.
So that the access via e.g. mobile works great, I would like to allow IPv6 as well.

How can I build step by step one rule (or more rules) to redirect the IPv6 traffic to IPv4?
So far I have successfully set up a DST-NAT for IPv4 and IPv6.
However, nothing is reachable over IPv6 as the application only speaks IPv4.
Proper firewall rules are also created to allow traffic to be routed from outside to inside.
I see the incoming IPv6 traffic in the logs.

Here is some data:

  • MikroTik RB5009
  • Own public IPv4 address, which changes every 24h
  • Own public IPv6 subnet (/56)
  • SLAAC is configured
  • ULA is configured
  • The server has a local IPv4 address
  • The server has a ipv6 address of SLAAC and ULA
  • A dynamic URL is configured

Why IPv6 NAT?
Because I have set up my dynamic URL in the router and it updates automatically.
So I don’t have to install anything extra on the server.
Is think easier :slight_smile:

Does anyone maybe have an idea for me?
Does this work at all?

sorry to break the bubble but NAT64 is not supported at this point

They could implement and adopt this in their stack but I think they are not interested on this at this point to stabilized ROS v7, but who knows

https://www.jool.mx/en/run-nat64.html

I’d keep this complexity on the server rather than the router, e.g. via 6tunnel.

@loloski Too bad that it doesn’t support MikroTik yet :frowning:

@Kentzo That is a good suggestion. Tested it briefly and found that 6tunnel can only do TCP, but not UDP.
My traffic is UDP unfortunately.
Just tried it with socat too

socat UDP6-RECVFROM:8282,fork UDP4-SENDTO:127.0.0.1:8280

… but did not work either.

Then the tool referred by @loloski might be helpful. IDK if dual-stack containers can be run on RouterOS, I think it was discussed somewhere here.

Yes, I’ll have a look at the tool.
I can install more containers on my Proxmox server.
But I also just noticed that I have a Docker container with nginx Prox Manager.
It can forward UDP traffic.
… I’ll try it first :slight_smile: