我正在尝试使用 wireguard 配置 VPN。
我的服务器配置:
[Interface]
PrivateKey = <key>
Address = 10.0.0.1/24
ListenPort = 51830
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = <key>
AllowedIPs = 10.0.0.2/32
客户端配置:
[Interface]
PrivateKey = <key>
Address = 10.0.0.2/32
DNS = 8.8.8.8
[Peer]
PublicKey = <key>
Endpoint = <my_host>:51830
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 20
当 wireguard 开启时,ping 可以工作。但我无法加载任何网页。我做错了什么?