l2tp vpn Ubuntu 22.04

l2tp vpn Ubuntu 22.04

我买了一台新笔记本电脑,并升级到 22.04,但我似乎无法再使用工作所需的 l2tp/ip-sec VPN。我使用 Gnome NetworkManager 来配置它(就像旧系统一样),我确实成功“连接”并收到 IP 地址,但我似乎无法在目标网络上 ping 任何东西。

我仍有旧安装,因此我连接到两台笔记本电脑上的 VPN,并将“ip a”和“ip route show”的输出粘贴到下面以进行比较。我确实看到“ip a”命令中有一个区别(如下所示),但我不确定我需要做什么才能使它们匹配,或者这是否是问题所在...

老的

13: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc fq_codel state UNKNOWN group default qlen 3
link/ppp 
inet 192.168.50.6/32 scope global noprefixroute ppp0
   valid_lft forever preferred_lft forever

新的

7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc fq_codel state UNKNOWN group default qlen 3
    link/ppp 
    inet 192.168.50.3 peer 216.83.74.140/32 scope global ppp0
       valid_lft forever preferred_lft forever
    inet 192.168.50.3/32 scope global noprefixroute ppp0
       valid_lft forever preferred_lft forever

老的

default via 192.168.86.1 dev wlp0s20f3 proto dhcp metric 600 
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-c395aa5e5b48 proto kernel scope link src 172.18.0.1 
192.168.1.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.10.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.13.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.50.1 dev ppp0 proto static scope link metric 50 
192.168.86.0/24 dev wlp0s20f3 proto kernel scope link src 192.168.86.43 metric 600 
192.168.86.1 dev wlp0s20f3 proto static scope link metric 600 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
216.83.74.140 via 192.168.86.1 dev wlp0s20f3 proto static metric 600 

新的

default via 192.168.86.1 dev wlp0s20f3 proto dhcp metric 600 
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
192.168.1.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.10.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.13.0/24 via 192.168.50.1 dev ppp0 proto static metric 50 
192.168.50.1 dev ppp0 proto static scope link metric 50 
192.168.86.0/24 dev wlp0s20f3 proto kernel scope link src 192.168.86.43 metric 600 
192.168.86.1 dev wlp0s20f3 proto static scope link metric 50 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
216.83.74.140 dev ppp0 proto kernel scope link src 192.168.50.3 
216.83.74.140 via 192.168.86.1 dev wlp0s20f3 proto static metric 50 

答案1

这是 NetworkManager 1.36 以来的一个路由错误。尝试使用以下命令删除没有度量的虚假路由:

sudo ip addr del 192.168.50.3 peer 216.83.74.140 dev ppp0

上游 NetworkManager 错误报告是:

相关的NetworkManager-l2tp错误报告:

相关内容