Live data from Hacker News

Enabling IPv6 support for IPv4 only apps on Linux

pavel.network

1–10 of 45 posts

Re: Enabling IPv6 support for IPv4 only apps on Linux

#5
Indeed, the transition to IPv6-only networks is a timely and important step, and this is an interesting approach. In my opinion, NAT64 in combination with DNS64 presents the most practical solution for home networks. This approach can be fully implemented by consumer routers, eliminating the need for any changes to client devices. If router manufacturers were to make NAT64 with DNS64 a default feature or, at the very least, an easily selectable option, it would significantly advance our progress toward widespread adoption of IPv6-only networks.

Re: Enabling IPv6 support for IPv4 only apps on Linux

#7
Using LD_PRELOAD for IPv4 seems to me like using the wrong tool for the job.

> "Most of the apps I use support IPv6 but there are some cases when lack of IPv4 connectivity on my machine negatively affects experience."

Just install clatd to get 464XLAT so hardcoded ipv4 get routed to 192.0.0.1 (the clat iface is the default gw for ipv4) which does NAT64 through tayga too.

IMHO the best strategy is a mix of strategies:

- 1. Clatd doing 464XLAT (RFC 6877) so:

- 1.1 Stateful protocol translation (RFC 6146) at CG-NAT64

- 1.2 Stateless protocol translation (RFC 6145) at the UE

- 2. DNS64 (RFC 6147) mechanisms at the DNS server returning padded AAAA for A only entries

- 3. IPv4 embedding into IPv6 addresses (RFC 6052 section 2.2)

Suggested reading: https://www.apnic.net/wp-content/uploads/2017/01/IPv6_Migrat...

Re: Enabling IPv6 support for IPv4 only apps on Linux

#8
post #5

Indeed, the transition to IPv6-only networks is a timely and important step, and this is an interesting approach. In my opinion, NAT64 in combination with DNS64 presents the most practical solution for home networks. This approach can be fully implemented by consumer routers, eliminating the need for any changes to client devices. If router manufacturers were to make NAT64 with DNS64 a default feature or, at the very…

Not just routers: android phones since 4.3 and iOS 12 both include a CLAT implementation to do just that.

clatd https://github.com/toreanderson/clatd/ is a nice and practical CLAT implementation: it does not "require" dns64 but can use it for single stateful translation instead of double

Re: Enabling IPv6 support for IPv4 only apps on Linux

#9

> Luckily for us Linux provides exceptionally easy way to intercept some specific library functions using simple dynamically linked library: LD_PRELOAD Doesn't LD_PRELOAD only work for non-statically linked executables?

Yes. It should work for most binaries that don't link statically with libc.
Post reply on HN