How do i reach IPv4 addresses from an IPv6-only network?

rubo77 asked:

I would like to reach this address via an IPv6 address:

In our Freifunk routers there is no DNS available, so the name cannot be resolved. All servers in the internet are only reacheable via ipv6 addresses. Now we cannot reach this package-mirror from inside the router t install packages via opkg install.

It would be a solution, if we could add this to our config for example:


Our routers are running OpenWRT and are IPv6-only and I would like to add an entry into /etc/hosts so that the domain name will resolve to an appropriate IPv6 address

Is it possible to redirect an IPv6 to a domain?

My answer:

You can’t simply “add” an IPv6 address to reach a host that is only available via IPv4. These are two completely different and incompatible protocols.

In order for your IPv6-only network to be able to reach IPv4 addresses, a gateway is required, which has access to IPv4. This is generally done with a NAT64/DNS64 gateway, which translates IPv4 addresses into “fake” IPv6 addresses, and accepts connections to those “fake” IPv6 addresses and translates the connections to the IPv4 network. These IPv6 addresses will be in the 64:ff9b::/96 range.

In OpenWrt, NAT64 is done with Tayga, and DNS64 with bind. Further information on how to set them up is available in the OpenWrt wiki. You’ll need Attitude Adjustment or Barrier Breaker; previous versions of OpenWrt did not have sufficiently complete support for IPv6 and other technologies.

You can add public DNS64/NAT64-resolvers to your /etc/resolv.conf:

nameserver 2001:67c:2b0::4
nameserver 2001:67c:2b0::6

You can also “revert” the translation on the client-site, using 464xlat. 464xlat uses the same tools. (mentioned above, but only in a different way). With 464xlat you can also reach urls with literal IPs.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.