设置:我有一个带有Sixfab IOT hat的raspi OS (v10),用于NBIOT连接。Sixfab通过PPP0工作,这是一个USB连接。
问题:当模块已经连接并正常工作时,我的LTE连接出现DNS问题。我的互联网连接已建立,我使用以下参数进行测试。
ping 8.8.8.8
Returns ICMP packets
ping google.com
ping: google.com: Name or service not known我不明白为什么我的DNS无法连接,所以我去手动分配DNS网络给谷歌。
sudo nano /etc/resolv.conf
*** File editor
nameserver 8.8.8.8
nameserver 1.1.1.1检查我的路由表时:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.174.233 0.0.0.0 UG 304 0 0 wlan0
10.8.0.1 10.8.0.13 255.255.255.255 UGH 0 0 0 tun0
10.8.0.13 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
169.254.0.0 0.0.0.0 255.255.0.0 U 225 0 0 wwan0
192.168.174.0 0.0.0.0 255.255.255.0 U 304 0 0 wlan0如果我的路由表不工作,我将无法ping通。我尝试使用sudo IP route add 0.0.0.0/0 dev wwan0将默认路由更改为wwan0接口,但这只会使互联网无法访问(这是有意义的,因为它必须通过点协议)
我的路由表
pi@raspberrypi:~ $ ip route
default dev ppp0 scope link
10.8.0.1 via 10.8.0.13 dev tun0
10.8.0.13 dev tun0 proto kernel scope link src 10.8.0.14
10.64.64.64 dev ppp0 proto kernel scope link src 10.200.143.221
169.254.0.0/16 dev wwan0 scope link src 169.254.198.107 metric 225顺便说一句,10.8.0.1是由我运行来连接到服务器的OpenVPN客户端设置的,这是一个私有VPS(在测试中,我看到断开连接时的openVPN问题得到了解决)。
缩小问题范围:似乎OpenVPN客户端有某种问题,它不会自动跳过它,而是要在公共网络上解决。
发布于 2021-06-10 00:28:10
经过大量的故障排除之后,我深入研究了OpenVPN的配置。
在Server End On OpenVPN-server配置文件中添加以下行,这确保了即使在连接到专用网络之后也设置了DNS选项我使用的是8.8.8.8,也就是google DNS
# DNS Push
push "dhcp-option DNS 8.8.8.8"https://stackoverflow.com/questions/67908168
复制相似问题