After playing with the network mode ‘Router’, I changed my GL.iNet White (GL-AR150 with firmware 3.201-release) via the Web interface → More → Network Mode to Access Point. Then, the access point is accessible via IPv4 only. IPv6 would be handy if the used network is IPv6-only or if the DHCP server broke down. That is not uncommon in hotels. In any way, I want to access my access point via IPv6 as well. The following steps have to be done only once in an IPv4-enabled network.
First step: Connect via SSH. With vi /etc/sysctl.conf
add
net.ipv6.conf.br-lan.forwarding = 0
net.ipv6.conf.br-lan.accept_ra = 1
exit the text editor vi
via the usual esc button and then :wq
sequence. With that, your access point accepts IPv6 Router Advertisements and creates a global IPv6 address†. Because your LAN client is going to use the same prefix, you are able to calculate the host ID from the MAC and then the IPv6 from the host ID and the prefix, for example with this Web page …
Next step: The SSH interface works via IPv4 and IPv6. However, the Web interface listens to IPv4 only.
With vi /etc/lighttpd/lighttpd.conf
add, after the existing line server.port = 80
:
$SERVER["socket"] == "[::]:80" { }
With vi /etc/lighttpd/conf.d/30-openssl.conf
add, at the very end:
$SERVER["socket"] == "[::]:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/server.pem"
}
as the official lighttpd
documentation describes.
Final step: Reboot!
Now, the Web interface of your access point is available not only via IPv4 but also via IPv6.
@GL.iNet, please, consider adding IPv6 access in future releases.
† There is one pitfall: If the upstream router does not support SLAAC but stateful DHCPv6 only, this trick does not work. However, until today, I never saw DHCPv6-only in public networks. In private home networks, no SLAAC is rare, too, because you need a static IPv6 prefix for stateful DHCPv6, normally. Anyway, report if you need support for stateful DHCPv6. Then I look into adding that as well.
‡ Not directly related but IPv6 makes it worse: When the network mode is router, my GL.iNet still offers itself to be a DNS proxy.
◊ There are voices on the Internet who claim ‘the’ OpenWrt approach would be
config interface 'lan6'
option ifname '@lan'
option proto 'dhcpv6'
in /etc/configs/network
plus some other magic options. However, everything I tried so far behaved wrong. If you found a working parameter combination, please, report.