WireGuard VPN服务器添加第二个客户端后无法访问互联网的问题求助
WireGuard VPN服务器添加第二个客户端后无法访问互联网的问题求助
大家好,我跟着不少指南总算搭好了一个可用的WireGuard VPN服务器,还成功连接了第一个客户端。但添加第二个客户端的时候遇到了麻烦——配置看起来都没问题,第一个客户端能正常访问互联网,第二个却只能和服务器完成握手,完全没有互联网流量传输。有没有大佬能帮忙分析下可能的原因?
服务器配置
[Interface] Address = 1.1.1.1/24 SaveConfig = false PreUp = iptables -t nat -A POSTROUTING -j MASQUERADE -o ens3 PreDown = iptables -t nat -D POSTROUTING -j MASQUERADE -o ens3 ListenPort = 49312 PrivateKey = ... [Peer] AllowedIPs = address.2/32 PublicKey = ... PresharedKey = ... [Peer] AllowedIPs = address.3/32 PublicKey = ... PresharedKey = ...
正常工作的Peer1配置
[Interface] Address = address.2/32 PrivateKey = ... [Peer] Endpoint = my-ip:49312 AllowedIPs = 0.0.0.0/0 PublicKey = ... PresharedKey = ...
无法访问互联网的Peer2配置
[Interface] Address = address.3/32 PrivateKey = ... [Peer] Endpoint = my-ip:49312 AllowedIPs = 0.0.0.0/0 PublicKey = ... PresharedKey = ...
我是不是哪里配置错了?还是有什么我没考虑到的细节?
备注:内容来源于stack exchange,提问作者Leteers




