Live data from Hacker News

Enabling IPv6 support for IPv4-only apps on Linux

blog.apnic.net

81–90 of 199 posts

Re: Enabling IPv6 support for IPv4-only apps on Linux

#81
Coming from the Apple ecosystem, this is solved on macOS/iOS by a native implementation of 464XLAT on the device (particularly the CLAT relay part.)

If you have a working NAT64/DNS64 setup, macOS can make a AAAA (ipv6 DNS) request to ipv4only.arpa, and observe the form the result comes back as, in order to learn the IPv6 prefix used for IPv4 compatibility on the network (eg. 64:ff9b::/96), and if it's not given an IPv4 address via DHCP, will set up a local interface at 192.0.0.1 that is the default route for all IPv4 traffic. Anything sent to this interface will translate the address to the corresponding IPv6 compatibility address and send it to your IPv6 router (which should use NAT64 to send it to the destination.)

In this sense, you don't need any IPv4 infrastructure at all in your network (no DHCP, etc) and all traffic on your LAN will be IPv6, but IPv4-only apps (including those that hardcode IPv4 addresses and try to connect to them) work fine.

A quick web search says that linux has a similar thing implemented as a userspace daemon (clatd) which presumably does something similar, and importantly doesn't rely on LD_PRELOAD hacks like this article suggests (LD_PRELOAD doesn't work with static binaries like those written in Go, for instance.)

Re: Enabling IPv6 support for IPv4-only apps on Linux

#82

Earlier quoted context omitted.

> I recently had to setup a non-encrypted website because I have a few old devices that can no longer do HTTPS. That sounds like they haven't been updated for TLS>1.1 – if that is the case then rather than going all the way down the HTTP you could enable TLS1.1 (and maybe 1.0). It is open to POODLE/BEAST/others that way, but still have some protection and the site's configuration differs less from the rest of your in…

Is there any way to get a certificate that these old devices would trust and that would work over TLS < 1.2?

No, that is the problem. They worked with less and less websites until there were none left. I needed to install some packages, which I could just put on my own server.

And I have an old Blackberry Bold that now show current electricity prices, so I know when to starte my washing machine. That can also run on own webserver.

https://gitlab.com/nelgaard/elpriser

Re: Enabling IPv6 support for IPv4-only apps on Linux

#83
post #53

Would be interesting to know which applications actually have problems with v6 - the example with directly using a v4 IP is more a user error, not an application issue. I pretty much stopped submitting patches enabling v6 functionality to various projects back in 2005 as everything I cared about was working at that point. (Side note, I was just trying to search a few of those - but seems that period pretty much doesn…

WSL2 famously doesn’t support ipv6 (because of NAT) which is mightily annoying.

The prerelease finally supports ipv6: https://github.com/microsoft/WSL/releases

Re: Enabling IPv6 support for IPv4-only apps on Linux

#84
post #38

Does anyone have a good write up of taking ones home network and going 100% ipv6 including dealing with iot devices that can't? I am thinking of doing it but I have a huge mix of devices from linux to windows and servers.

There's absolutely _no_ good reason to do that if you're only facing the internet with a single IP on your router as a NAT gateway, except to make your life hell. Only thing that may be worth doing is parting ways with the one internet-facing IPv4 and relying solely on IPv6 there, but that's mostly up to your ISP and their own infrastructure. Even if you were to 100% NAT your IPv4 LAN to IPv6 WAN, and your ISP still…

I get a static /48 IPv6 subnet from my ISP so I want to give it a try.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#85
post #8

Earlier quoted context omitted.

Being able to access legacy systems from new ones is a good property of new systems. This workaround is important. (Also that may be done on routers which today deal with NAT anyway)

This isn't a workaround; it is a kludge. There are far better solutions in this problem space (some mentioned in this very thread).

Yeah I don't get it. If you need to access IPv4 for legacy reasons then dual stack seems like the solution here. Yes it's a lot of overhead since you have to deal with an IPv4 and IPv6 routing table. AFAIK Windows has had both enabled by default for a long time.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#87
I kid you not, WordPress.org does not support IPv6 to fetch plugins, themes etc.

https://meta.trac.wordpress.org/ticket/3090

"The WordPress.org systems team DO have IPv6 plans, but at present there are higher priority tasks and there's no widespread requirement for IPv6 connectivity."

Its not possible to run a WordPress instance and auto-update with IPv6-only and without any kind of adress translation.

Re: Enabling IPv6 support for IPv4-only apps on Linux

#88

Coming from the Apple ecosystem, this is solved on macOS/iOS by a native implementation of 464XLAT on the device (particularly the CLAT relay part.) If you have a working NAT64/DNS64 setup, macOS can make a AAAA (ipv6 DNS) request to ipv4only.arpa, and observe the form the result comes back as, in order to learn the IPv6 prefix used for IPv4 compatibility on the network (eg. 64:ff9b::/96), and if it's not given an IP…

Where can I find documentation about this?

Re: Enabling IPv6 support for IPv4-only apps on Linux

#89
post #87

I kid you not, WordPress.org does not support IPv6 to fetch plugins, themes etc. https://meta.trac.wordpress.org/ticket/3090 "The WordPress.org systems team DO have IPv6 plans, but at present there are higher priority tasks and there's no widespread requirement for IPv6 connectivity." Its not possible to run a WordPress instance and auto-update with IPv6-only and without any kind of adress translation.

Ticket is 6 years old by the way ...

Re: Enabling IPv6 support for IPv4-only apps on Linux

#90

The main advantage of Linux over other systems is that its available from source and thus can be patched and recompiled easily. Here we see someone using LD_PRELOAD to patch the behavior of a binary, because they rely on distributions pre-compiled packages without means to change the source code themselves. This sort of negates that advantage, right?

Try actually recompiling something nontrivial but open-source, and getting the exact binary you already have, the one which you know works but just needs the one modification you want.

You'll quickly discover that "open source" doesn't make everything easier.

Post reply on HN