Tune your NAT64

If you follow my last post, you have now NAT64 up and running. The downside of the solution is, that you have to disable manually IPv4 on your client and configure public DNS64 servers.


 

That is quite uncool, because, if you change the network the disabled IPv4 comes to a network without NAT64, so you will receive NAT64-prefixed AAAA-records, but those websites are not reachble for you, because no router does the NAT64 😕

Rollback client

First, you can rollback all configurations (IPv4 disabled, DNS entries) to default. That means:

  • enable IPv4
  • set DNS entries to automatic

Enhance OpenWRT

Because we don't want IPv4 in our IPv6-only network 😏We disable DHCPv4 on the LAN interface.

From the General Setting tab switch over to the DHCP tab, General Setup. Enable Ignore Interface, because we don't need DHCP.
 
In the sub-tab IPv6 Settings enter these two Cloudflare - or any different - public DNS64 servers: 
  • 2606:4700:4700::64
  • 2606:4700:4700::6400 (seems, that the last one is the prefered DNS)

After every tab click on Save, after all steps click on Save&Apply.
If not already done, you can configure Wireless - if you like - I do that with SSID v6-only.
When I am connect to the v6-only wifi my client has no IPv4 (exept the not working IPv4 APIPA):

Using the commandline (optional)

May be some of you don't want to mess around with Luci, the webinterface of OpenWRT. Here are the relevant sniplets of the config files:
/etc/config/network
 config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option gateway '192.168.178.1' # this is the IPv4 of the internet router
        option broadcast '192.168.1.255'
        list dns '192.168.178.1'
        list dns_search 'box'
        option ip6assign '64'
        option ip6ifaceid '::2'


/etc/dhcp
config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ignore '1'
        list dns '2606:4700:4700::64'
        list dns '2606:4700:4700::6400'
        list ra_flags 'none'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

 /etc/wireless
config wifi-device 'radio1'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0'
        option channel '36'
        option band '5g'
        option htmode 'HT20'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan' #this is the important part, but it's default
        option mode 'ap'
        option ssid 'v6-only'
        option encryption 'sae-mixed'
        option key '<very secret pw>'
        option wpa_disable_eapol_key_retries '1'

 

Comments

Popular posts from this blog

Today: Starting with IPv6-only

IPv4-Internet services 2022 - the bad guys