Using an IPv6-only internal network in a real-world environment
Problem: Not all client applications are ipv6-aware
Even though now all ipv6-aware applications will connect over ipv6, unless
they prefer to use ipv4 if both an A and an AAAA-record are available,
there will be ipv4-only applications around for some time.
So we want to 'translate' all IPv4 packets to IPv6 packets with the TRT prefix. I can think of several approaches to this problem:
- Write a kernel module that overloads the networking calls (like 'connect()'), and translates them to IPv6
cannot be implemented cleanly, read more...
- use the 'mangling' capabilities of iptables
iptables currently doesn't support this
- use an ipv4-in-ipv6 tunnel
This way, the router would have to have a tunnel for every single internal host, and do NAT. All hosts would need IPv4 addresses, and we want to avoid that.
- Analoguous to the way pTRTd works, create a 'virtual' (TUN/TAP) IPv4 interface and route all IPv4 into this interface. Have a program translate all packets on that interface to/from IPv6.
read more...
Finally, what seems to be the most promising is overloading calls like connect() to libc with
LD_PRELOAD. Actually, since I wrote most of these pages, transng has published:
Which would be about exactly what we were looking for :). I've started on implementing
this, but it's all still *very* rudimentary.
But, already, some stuff works. Example:
arnouten@mintzer:~$ echo "GET /" | nc mintzer.ipv6.bzzt.net 80
mintzer.ipv6.bzzt.net: forward host lookup failed: No address associated with name : No such file or directory
arnouten@mintzer:~$ export LD_PRELOAD=./translib.so.0.1
arnouten@mintzer:~$ echo "GET /" | nc mintzer.ipv6.bzzt.net 80
<html><head>
<title>www.bzzt.net: welcome to mintzer!</title>
(etcetera)