fix: set accept_ra=2 to fix missing ipv6 address on WAN interface if necessary (#504)

This commit is contained in:
mzz
2024-06-11 21:33:21 +08:00
committed by GitHub
parent ec7cf06de4
commit 3d68dbafdc
5 changed files with 61 additions and 9 deletions

View File

@ -10,7 +10,7 @@ For every LAN interfaces you want to proxy:
```shell
export lan_ifname=docker0
sudo tee /etc/sysctl.d/60-dae-$lan_ifname.conf << EOF
sudo tee /etc/sysctl.d/60-dae-lan-$lan_ifname.conf << EOF
net.ipv4.conf.$lan_ifname.forwarding = 1
net.ipv6.conf.$lan_ifname.forwarding = 1
net.ipv4.conf.$lan_ifname.send_redirects = 0
@ -27,3 +27,20 @@ sudo sysctl --system
```
Please modify `docker0` to your LAN interface.
For your WAN interfaces that accept RA:
```shell
export wan_ifname=eth0
if [ "$(cat /proc/sys/net/ipv6/conf/$wan_ifname/accept_ra)" == "1" ]; then
sudo tee /etc/sysctl.d/60-dae-wan-$wan_ifname.conf << EOF
net.ipv6.conf.$wan_ifname.accept_ra = 2
EOF
sudo sysctl --system
fi
```
Please modify `eth0` to your WAN interface.
Setting accept_ra to 2 if it is 1 because `net.ipv6.conf.all.forwarding = 1` will suppress it. See <https://sysctl-explorer.net/net/ipv6/accept_ra/> for more information.