]>
Commit | Line | Data |
---|---|---|
223bb49e PL |
1 | DNS64 support |
2 | ============= | |
3 | ||
4 | DNS64, described in :rfc:`6147` is a technology to allow IPv6-only clients to receive special IPv6 addresses that are proxied to IPv4 addresses. | |
5 | This proxy service is then called NAT64. | |
6 | ||
7 | As an example, let's say an IPv6 only client would want to connect to ``www.example.com``, it would request the AAAA records for that name. | |
8 | However, if ``example.com`` does not actually have an IPv6 address, what we do is 'fake up' an IPv6 address. | |
9 | We do this by retrieving the A records for ``www.example.com``, and translating them to AAAA records. | |
10 | Elsewhere, a NAT64 device listens on these IPv6 addresses, and extracts the IPv4 address from each packet, and proxies it on. | |
11 | ||
ef3ee606 RG |
12 | As of 4.4.0, an efficient implementation is built the recursor and can be enabled via the using the :ref:`dns64-prefix setting <setting-dns64-prefix>`. |
13 | On earlier versions or for maximum flexibility, DNS64 support is included in the :doc:`lua-scripting/index`. | |
223bb49e PL |
14 | This allows for example to hand out custom IPv6 gateway ranges depending on the location of the requestor, enabling the use of NAT64 services close to the user. |
15 | ||
16 | Apart from faking AAAA records, it is also possible to also generate the associated PTR records. | |
17 | This makes sure that reverse lookup of DNS64-generated IPv6 addresses generate the right name. | |
18 | The procedure is similar, a request for an IPv6 PTR is converted into one for the corresponding IPv4 address. | |
19 | ||
20 | To setup DNS64, with both forward and reverse records, create the following Lua script and save it to a file called ``dns64.lua`` | |
21 | ||
22 | .. literalinclude:: ../contrib/dns64.lua | |
23 | :language: lua | |
24 | ||
7bb40b8d | 25 | Where fe80::21b:77ff:0:0 is your "Pref64" translation prefix and the "ip6.arpa" string is the reversed form of this Pref64 address. |
223bb49e PL |
26 | Now ensure your script gets loaded by specifying it with :ref:`lua-dns-script=dns64.lua <setting-lua-dns-script>`. |
27 | ||
7f0194ee | 28 | To enhance DNS64, see the :doc:`lua-scripting/index` documentation. |