Proxmox主机作为WireGuard客户端无法连接至服务器的问题求助
Proxmox主机作为WireGuard客户端无法连接至服务器的问题求助
我现在想把我的Proxmox主机配置成现有WireGuard服务器的客户端,这样就能从家里以外的网络访问它了。
我参照Debian 11的WireGuard客户端配置流程操作后,执行了以下命令:
systemctl enable wg-quick@wg0.service systemctl start wg-quick@wg0.service
虽然服务状态显示Active: active (exited),但服务器端完全看不到任何连接请求。
下面是执行systemctl status wg-quick@wg0.service得到的输出:
● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0 Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; preset: enabled) Active: active (exited) since Wed 2023-10-25 12:58:25 CEST; 5min ago Docs: man:wg-quick(8) man:wg(8) https://www.wireguard.com/ https://www.wireguard.com/quickstart/ https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8 https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8 Process: 777 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS) Main PID: 777 (code=exited, status=0/SUCCESS) CPU: 25ms Oct 25 12:58:25 algo systemd[1]: Starting wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0... Oct 25 12:58:25 algo wg-quick[777]: [#] ip link add wg0 type wireguard Oct 25 12:58:25 algo wg-quick[777]: [#] wg setconf wg0 /dev/fd/63 Oct 25 12:58:25 algo wg-quick[777]: [#] ip -4 address add 12.187.257.16 dev wg0 Oct 25 12:58:25 algo wg-quick[777]: [#] ip link set mtu 1420 up dev wg0 Oct 25 12:58:25 algo wg-quick[777]: [#] ip -6 route add ::/1 dev wg0 Oct 25 12:58:25 algo wg-quick[777]: [#] ip -6 route add 8000::/1 dev wg0 Oct 25 12:58:25 algo wg-quick[777]: [#] ip -4 route add 128.0.0.0/1 dev wg0 Oct 25 12:58:25 algo wg-quick[777]: [#] ip -4 route add 0.0.0.0/1 dev wg0 Oct 25 12:58:25 algo systemd[1]: Finished wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0.
执行wg命令查看WireGuard状态的输出:
interface: wg0 public key: tgiehhoZKLHNCjebdsf64uyIgTUQNVJiXahPEYVBcH0k= private key: (hidden) listening port: 58649 peer: 8bfBMSRm2emrzchft6356dgm2UggkPbeStfwE7UdLi4= endpoint: 12.187.257.16:1194 allowed ips: 0.0.0.0/1, 128.0.0.0/1, ::/1, 8000::/1 transfer: 0 B received, 1.59 KiB sent
我的wg0.conf配置文件内容如下:
[Interface] # specify private key for client generated on WireGuard server PrivateKey = XXXXXXXXXXXXX # IP address for VPN interface Address = 10.198.273.61 [Peer] # specify public key for server generated on WireGuard server PublicKey = XXXXXXXXXXXXX # IP addresses you allow to connect # on the example below, set WireGuard server's VPN IP address and real local network AllowedIPs = 0.0.0.0/1, 128.0.0.0/1, ::/1, 8000::/1 # specify server's global IP address:port # (acutually, example of IP below is for private range, replace to your own global IP) EndPoint = 103.16.54.18:1194
整个过程没有任何报错,但服务器端就是看不到连接。而且完全相同的客户端配置在Windows 11上是可以正常连接的,这就很困扰我。
有没有大佬能帮我分析下问题出在哪?
备注:内容来源于stack exchange,提问作者ale.ttone
相关产品推荐
相关产品推荐

