Hi,
I'm fighting with IPv6 since a while now and learned a lot already.
I'm running a guest wifi on one of my OpenWrt Boxes. I've tried to simply "convert" this setup into IPv6. Please no disscussion about the necessity or meaning of doing that. I just want to learn a bit.
network:
config interface 'guest'
option proto 'static'
option ipaddr '192.168.5.1'
option netmask '255.255.255.0'
option ifname 'wlan1-1'
dhcp:
config dhcp 'guest'
option interface 'guest'
option start '10'
option limit '10'
option leasetime '4h'
option force '1'
list dhcp_option 'option:dns-server,192.168.1.1'
wifi-iface:
config wifi-iface 'guest'
option device 'radio1'
option mode 'ap'
option ssid 'GUESTWIFI'
option network 'guest'
option encryption 'psk2+ccmp'
option key 'PASSWORD'
option wpa_disable_eapol_key_retries '1'
option ieee80211w '1'
For DNS I'm running unbound (public resolver) and dnsmasq (local resolver) on localhost. To achive/force that I have setup appropriate firewall.
network:
config interface 'guest'
option proto 'static'
option ipaddr '192.168.5.1'
option netmask '255.255.255.0'
option ifname 'wlan1-1'
option ip6assign '62'
config dhcp 'guest'
option interface 'guest'
option start '10'
option limit '10'
option leasetime '1h'
option force '1'
option dhcpv6 'server'
option ra_management '1'
list dhcp_option 'option:dns-server,192.168.1.1'
option ra 'server'
option ra_default '1'
option ndp 'hybrid'
option ra_slaac '1'
list dns 'fdxx:xxxx:xxxx::1' #ula from openwrt, no clue if this is correct; like 192.168.1.1
no changes on wifi iface.
As there is still no button for guest Wifi in OpenWrt like in every other router nowdays I had to track down firewall rules (I had no clue about the ICMP shit) and have the following for now:
config rule
option target 'ACCEPT'
option family 'ipv6'
option proto 'icmp'
option src 'guest'
option name 'Allow-GUESTWIFI-PINGv6'
list icmp_type 'echo-request'
config rule
option target 'ACCEPT'
option family 'ipv6'
option src 'guest'
option proto 'icmp'
list icmp_type 'neighbour-advertisement'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'router-solicitation'
option name 'Allow-GUESTWIFI-SLAACv6'
config rule
option src 'guest'
option proto 'icmp'
option family 'ipv6'
option target 'ACCEPT'
option name 'Allow-GUESTWIFI-MLDv6'
list src_ip 'fe80::/10'
config rule
option name 'Allow-GUESTWIFI-DHCPv6'
option family 'ipv6'
list proto 'udp'
option src 'guest'
option src_port '546'
option dest_port '547'
option target 'ACCEPT'
config rule
option name 'Allow-GUESTWIFI-DNS'
option src 'guest'
option src_port '53'
option dest_port '53'
option target 'ACCEPT'
list proto 'tcp'
list proto 'udp'
config rule
option name 'Block-GUESTWIFI-WAN-DNS-v4'
option src 'guest'
option proto 'tcp udp'
option dest_port '53'
option family 'ipv4'
option dest 'wan'
option target 'REJECT'
config rule
option name 'Block-GUESTWIFI-WAN-DNS-v6'
option src 'guest'
option proto 'tcp udp'
option dest_port '53'
option family 'ipv6'
option dest 'wan'
option target 'REJECT'
As I cannot setup IPv6 redirects/dnat over luci interface I have added:
ip6tables -t nat -A PREROUTING -i wlan1-1 -p udp --dport 53 -j DNAT --to-destination
[fdxx:xxxx:xxxx::1]:53
For now I'm getting an IPv6 on my clients and I'm able to ping fdxx:xxxx:xxxx::1 from guest. But name resolution is not working. I can surf with the Browser if I enter the IP's directly. So no general connection error.
guest wifi is getting: fdxx:xxxx:xxxx:10::1/62 and ofc a public /62
clients have also a local and a public address.
If I look into tcpdump I can see a lot of ff02/icmp6 traffic. As far I have read this is for SLAAC.
Another line what I have spotted is fdxx:xxxx:xxxx::1 > guest-client ICMP6, destination unreachable, unreachable port, udp prot domain ... But firewall on client is off. So I have overseen sth. on firewall I guess. Maybe someone of you guys has a hint for me what I have overseen.