
WireGuard VPN을 설정하고 모든 VPN 클라이언트/64 IPv6 서브넷을 배포하기 위해 VDS를 임대했습니다. 호스팅에서 원래 주소를 얻었습니다 2a0c:xxx:yyy::1/32
. 제가 설정한 네트워크 인터페이스의 구성은 다음과 같습니다.
❯ ip a
2: wan0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 ...
inet6 2a0c:xxx:yyy:1001::1/32 scope global
valid_lft forever preferred_lft forever
inet6 fe80::****:**:****:****/64 scope link
valid_lft forever preferred_lft forever
3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue ....
inet 172.22.9.1/24 brd 172.22.9.255 scope global wg0
valid_lft forever preferred_lft forever
inet6 fd4d:56d8:31d4:2001::1/56 scope global
valid_lft forever preferred_lft forever
❯ ip -6 r
::1 dev lo proto kernel metric 256 pref medium
2a0c:xxx:yyy:2000::/56 dev wg0 proto static metric 20 pref medium
2a0c:xxx::/32 dev wan0 proto kernel metric 256 pref medium
2a0c:xxx::/32 dev wan0 proto ra metric 1024 expires 2591851sec pref medium
fd4d:56d8:31d4:2000::/56 dev wg0 proto kernel metric 256 pref medium
fe80::/64 dev wan0 proto kernel metric 256 pref medium
default proto static metric 1024 pref medium
nexthop via 2a0c:xxx::1 dev wan0 weight 1
nexthop via fe80::****:****:****:**** dev wan0 weight 1
❯ sudo sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 1
❯ cat /etc/ndppd.conf
proxy wan0 {
rule 2a0c:xxx:yyy:2000::/56 {
static
}
}
# --- check routing to dns.google from one of the VPN clients ---
❯ ip -6 r get to 2001:4860:4860::8844 from 2a0c:xxx:yyy:2005::****:*
2001:4860:4860::8844 from 2a0c:xxx:yyy:2005::****:* via fe80::****:****:****:**** dev wan0 proto ra src 2a0c:xxx:yyy:1001::1 metric 1024 mtu 1500 pref medium
fd4d:56d8:31d4:20zz::/64
모든 VPN 클라이언트 와 서브넷을 제공합니다 2a0c:xxx:yyy:20zz::/64
( zz
클라이언트마다 다름). 처음 설정했을 때 모든 것이 제대로 작동했고 클라이언트는 IPv6를 통해 인터넷에 액세스할 수 있었습니다. 그러나 VDS를 재부팅한 후에는 이 구성이 더 이상 작동하지 않았습니다.
VPN에 연결되지 않은 다른 호스트의 주소로 VPN 클라이언트에 ping을 시도했을 때 업스트림 라우터에서 wan0으로 2a0c:xxx:yyyy:2005::****:*
여러 개의 이웃 요청 패킷( )을 받았고 who has 2a0c:xxx:yyy:2005::****:*
, VDS는 주기적으로 이웃 광고 패킷으로 응답했습니다. 그러나 wan0이나 wg0에 대한 에코 요청은 오지 않았습니다.
내 구성에 어떤 문제가 있나요? VDS 재부팅 후 WireGuard를 통한 IPv6 작동이 중지되는 이유는 무엇입니까?
미리 감사드립니다.
99-wg0.netdev
[NetDev]
Name=wg0
Kind=wireguard
[WireGuard]
PrivateKey=kH9-----------------------86u/Uw=
ListenPort=1194
[WireGuardPeer]
PublicKey=oXPdkrbDL---------------oKLW2HEEM=
PresharedKey=L9P------------------------jSiM=
AllowedIPs=2a0c:xxx:yyy:2005::/64
AllowedIPs=172.22.9.5/32
99-wg0.network:
[Match]
Name=wg0
[Network]
Address=172.22.9.1/24
[Route]
Destination=2a0c:xxx:yyy:2000::/56
Metric=20