Skip to contentSkip to conversation

DNAT: IPv4 to IPv6

DISCUSSION Thomas Glanzmann 2 participants 2 messages Dec 17, 2013

lore
Share & tools
lore
#0 lore raw

Hello,
I would like to DNAT IPv4 to IPv6. Is this currently possible maybe with nftables?

I'm looking for something similiar to:

iptables -t nat -A PREROUTING -p tcp --dport 4001 -d 1.2.3.4 -j DNAT --to '[fd00::fffa:1]:22'

Currently I use socat as workaround but would love to do that in the kernel.

Cheers,
Thomas

#1 lore raw
Quoted 3 lines · Thomas Glanzmann

Hello,
I would like to DNAT IPv4 to IPv6. Is this currently possible maybe with nftables?

As far as I know, you cannot. IPv4 and IPv6 are totally different and incompatible protocols. You would have as much luck NATting IPv4 to Appletalk, NetWare or X.25.