mkdir /etc/jool
echo '{"instance":"nat64-minimal","framework":"netfilter","global":{"pool6":"64:ff9b::/96"}}' > /etc/jool/jool.conf
apt install jool-dkms jool-tools
On a box behind the NAT: curl --resolve one.one.one.one:443:64:ff9b::1.1.1.1 https://one.one.one.one
If you want DNS64, 1.1.1.1 and 8.8.8.8 offer 2606:4700:4700::64 and 2001:4860:4860::6464 respectively or you can configure unbound pretty easily. > one.one.one.one:443:64:ff9b::1.1.1.1
Is this a typo or a weird curl-specific address format I've never heard of? --resolve <[+]host:port:addr[,addr]...>
Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s)
use a specified address and prevent the otherwise normally resolved address to be used. Consider it a
sort of /etc/hosts alternative provided on the command line. # apt search jool
Sorting... Done
Full Text Search... Done
jool-dkms/stable 4.1.9-1 all
kernel-based SIIT and NAT64 (IP/ICMP translation)
jool-tools/stable 4.1.9-1 amd64
userspace utilities for the Jool kernel modules
I suppose it is packaged, but dkms is still very much in the "why is does my router need a compiler installed" vibe.I did a similar experiment as the submitted article back in 2020, though that was on a pfSense (FreeBSD) router, not Linux. I used tayga for NAT64 there, which was last released in 2010, but it probably still works on modern Linux. At the very least it's still packaged in Debian.
Someone has made a NAT64 implementation using eBPF, though with quite some caveats: https://github.com/xdp-project/bpf-examples/tree/master/nat6...
Then there are out-of-tree modules of varying quality, none of those I've looked at being amazingly inspiring code-wise. As out-of-tree modules, they'd need to be rebuilt whenever you rebuild your kernel, but would inconveniently not be built as part of that kernel unless you patch them in.
I'd not seen the eBPF implementation before. That's quite a nice idea. Quite tempted to have a hack at that to fix the minor issues the author identifies.
(What's the story with building eBPF programs nowadays? Are there all kinds of crazy dependencies, or is the situation better than it used to be?)
The eBPF one is very interesting and does seem to work the way I expect NAT to work (no extra interfaces, just rewriting packets as they come and go), but is 1. unfinished by its own description, and 2. again a 3rd-party code drop that I'd have to package and ship myself if I wanted to use it. And I can do that, but I really don't like my routers to need fiddling.
If you decide to try OpenBSD I hope you will enjoy it! I personally find it easier to understand and configure than Linux, but I could be biased.