Live data from Hacker News

Enabling IPv6 support for IPv4-only apps on Linux

blog.apnic.net

31–40 of 199 posts

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

#31
post #29

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?

I don't think openssh upstream would accept a patch that makes ssh interpret ipv4 addresses as anything other than ipv4 addresses, and who wants to carry such a patch downstream forever?

You don't need to merge upstream! Its your source, your build, your rules.

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

#32
Why is this not just default behaviour?

If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used.

How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

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

#33

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.

I'm 100% the opposite. Define everything ipv4, turn off ipv6 and have one set of private ip addresses, one set of firewall rules and NAT at the firewall/router.

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

#34
post #29

Earlier quoted context omitted.

I don't think openssh upstream would accept a patch that makes ssh interpret ipv4 addresses as anything other than ipv4 addresses, and who wants to carry such a patch downstream forever?

You don't need to merge upstream! Its your source, your build, your rules.

And if you're happy to take on that work (and the associated risk) forever, go for it. For others, hacks like tnat64 work fine. They also work for lots of programs, where patching each one individually to somehow detect that it's behind NAT64 and behave differently is a lot of work!

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

#35

Why is this not just default behaviour? If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used. How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

I'm sure LKML will be happy to review your proposed patch... :)

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

#36

Super cool! I tried doing a pure IPv6 network a little over a decade ago; Maybe I’ll try it again. Though, my cheap IoT devices likely still need IPv4… but perhaps not internet connectivity. It might be fun to explore just how much IPv4 continues to be ingrained into cheap Things (eg: Arduino WiFI?) There always seems to be a long tail of small places where IPv4 pops straight back into the equation.

Small places? When I disabled IPv4 a few weeks ago, I couldn't use: HN, GitHub, Reddit, Discord, Duckduckgo.

Docker hub was the one that pushed me over the edge, so I just paid the extra 50c a month per server for ipv4 on cloud servers.

Update - 23 Aug 2023 — Today, we are pleased to announce the general availability of IPv6 support for the Docker Hub Registry

Apparently it can be done now, I wont be finding out in a hurry.

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

#37
post #29

Earlier quoted context omitted.

I don't think openssh upstream would accept a patch that makes ssh interpret ipv4 addresses as anything other than ipv4 addresses, and who wants to carry such a patch downstream forever?

You don't need to merge upstream! Its your source, your build, your rules.

Maintaining your own patchset for your personal use is usually not a good use of your time and expertise.

Every time someone runs a linter over upstream, you're going to have to remake that patch. Sure, it's only 20 mins... But that multiplied by every bit of software you patch and every release, and you quickly realise that a huge chunk of your life was wasted doing what is effectively busywork.

Instead, contribute your time and efforts back to upstream, and now your efforts can help millions of people not just one. If others do the same, you'll see far more improvements to the software you use than you alone could ever write and maintain.

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

#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 dedicated your router a public IPv4, it'd benefit no one.

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

#39

Why is this not just default behaviour? If I don't have IPv4 connectivity, yet a 6-to-4 gateway exists and I have IPv6 connectivity, and some app tries to use IPv4, then clearly the gateway should be used. How about some sysfs config option that says "redirect ipv4 to 6to4 gateway if no default ipv4 route exists", enabled by default.

Probably due to side effect.

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

#40

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?

Isn't having the source available only the advantage it has over Windows? For most people the advantage is probably, as 'bcantrill once said, that they can Google their stacktraces.
Post reply on HN