一、前言

二、安装WireGuard

三、隧道模板

1
2
3
4
5
6
7
8
9
10
11
12
[Interface]
Address = 2400:e3e0:f5aa:9a91:89c3:76b6:6052:78bb/64
ListenPort = 9999
PrivateKey = RaUBB4mqK+KOcEWIGK1btr8TwCbab+GqbBgguKKCylA=
PostUp = ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PreDown = ip6tables -D FORWARD -i %i -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = Rp350Fpd49rs7jKFN/o62nNTsMNDK/Og+K8iGwqQlVQ=
AllowedIPs =


1
2
echo net.ipv6.conf.all.forwarding=1 > /etc/sysctl.conf
sysctl -p