我有如下配置的wireguard服务器和客户端:
服务器:
[Interface]
PrivateKey = <server private key>
Address = 192.168.2.4
ListenPort = 51821
[Peer]
PublicKey = <client public key>
AllowedIPs = 172.20.10.5/32客户端:
[Interface]
PrivateKey = <client private key>
Address = 172.20.10.5
[Peer]
PublicKey = <server public key>
AllowedIPs = 192.168.2.4/32
Endpoint = <Public IP>:51821
PersistentKeepalive = 25当我同时启动它们时,我的客户机不能ping服务器网络中的任何机器。在borowser中,IP仍然是客户端的互联网ip。当我在客户端运行wg时,它显示在传输信息中发送了一些数据,而接收到的数据为0。
我的配置中有没有明显的错误?如果没有,常见的故障排除方法是什么?
发布于 2019-09-23 22:45:46
也许可以试试:
服务器:
[Interface]
PrivateKey = <server private key>
Address = 10.200.200.1/24
ListenPort = 51821
[Peer]
PublicKey = <client public key>
AllowedIPs = 10.200.200.2/32客户端:
[Interface]
PrivateKey = <client private key>
Address = 10.200.200.2/32
[Peer]
PublicKey = <server public key>
AllowedIPs = 10.200.200.1/24
Endpoint = <Public IP>:51821
PersistentKeepalive = 25我没有尝试过AllowedIPs选项,所以我不能保证它会起作用。我可以通过删除这些行来保证它的工作。但希望你已经弄清楚了!
如果有用的话,我做了一个教程:https://github.com/agavrel/wireguard_cloud
https://stackoverflow.com/questions/56534747
复制相似问题