Closed pgj closed 1 year ago
I have got a proof-of-concept solution working. Random notes about it:
It needs IPv6 NAT to translate the unique local address on the (FreeBSD) host to that of the had the (Wifibox) guest assigned. Currently the Linux kernel is not configured to provide IPv6 NAT, Wifibox/Alpine will need a version of that.
ip6tables
rules are not loaded automatically, this has to be fixed in the guest.
The host can use the fd00::1/64
unique local address. In rc.conf(5)
:
ifconfig_wifibox0_ipv6="inet6 fd00::1/64 auto_linklocal"
ip6tables
rules:
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
[0:0] -A POSTROUTING -o wlan0 -s fd00::/64 -j MASQUERADE
COMMIT
*filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] [0:0] -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT [0:0] -A FORWARD -i eth0 -o wlan0 -j ACCEPT
COMMIT
- `dhcpd` needs to have installed for the Wifibox guest. Not sure about the contents of the `dhcpd.conf`, defaults could just work fine.
- `radvd` is not needed.
A static route is needed in the guest too:
ip -6 route add fd00::/64 dev eth0
Automated propagation of information on DNS servers for the host should be solved somehow.
Make the necessary changes to have IPv6 fully working. Tasks:
udhcpd
supports dual-stack configuration or it shall be replaced fordhcpcd
as suggested by the Alpine Linux Network Configuration pageip6tables
worksip6tables