You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派(Bullseye)配置WireGuard/VPN后无法连接互联网的问题排查求助

树莓派(Bullseye)配置WireGuard/VPN后无法连接互联网的问题排查求助

我有一台运行Bullseye系统的树莓派,最近在尝试配置WireGuard/VPN后,它就没法连接互联网了。

下面是我的路由表信息,执行命令 route -n 得到的输出:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    202    0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
10.172.124.0    0.0.0.0         255.255.255.0   U     0      0        0 wg0
169.254.0.0     0.0.0.0         255.255.0.0     U     208    0        0 veth47c79f7
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-405564307d93
192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

按我的理解,ping 8.8.8.8的时候应该走eth0接口,但实际看起来它走了wg0:

pi@raspberrypi4:~ $ ip route get 8.8.8.8
8.8.8.8 dev wg0 table 51820 src 10.172.124.1 uid 1000
    cache

当我指定eth0接口ping的时候是可以连通的:

pi@raspberrypi4:~ $ ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.1.148 eth0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=11.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=9.08 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=13.2 ms

但用默认接口ping就完全不通:

pi@raspberrypi4:~ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5119ms

有没有大佬能指点下问题可能出在哪?感谢!

备注:内容来源于stack exchange,提问作者Robert Tu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 08:04:38