![VPN 已连接但远程网络无法访问](https://linux22.com/image/1171664/VPN%20%E5%B7%B2%E8%BF%9E%E6%8E%A5%E4%BD%86%E8%BF%9C%E7%A8%8B%E7%BD%91%E7%BB%9C%E6%97%A0%E6%B3%95%E8%AE%BF%E9%97%AE.png)
我突然遇到一个问题。上个月,我的工作场所为在家办公准备了 VPN,它运行良好。大约两周前,我停止使用它。现在我需要再次使用它,但它却停止运行了。
据我的同事说,服务器一个月内没有变化,甚至没有更新。我定期更新/升级我的客户端(内核现在是 5.3.0-46-generic)。
我正在使用 Ubuntu 的内置 VPN 客户端(在网络 GUI 中),身份验证方法为 MSCHAP 和 MSCHAPv2
症状如下:
ping
互联网 IP 工作ping
并且host
互联网地址有效(DNS解析有效)ping
VPN 服务器工作ping
工作时的其他计算机不再起作用(其中一台计算机可以通过其 Web 界面访问,因此它正在运行,并且 IP(静态路由)没有改变)traceroute
到互联网的 IP 没有显示任何通过工作地点的路线(之前是通过工作地点的路线)
一些额外的信息:
cat /etc/resolv.conf
:
# Generated by NetworkManager
search dynamic.ziggo.nl
nameserver 127.0.0.53
ifconfig
启用VPN后的区别:
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1400
inet 192.168.178.231 netmask 255.255.255.255 destination 192.168.178.81
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 7 bytes 94 (94.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 112 (112.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
摘录自cat /var/log/syslog|grep NetworkManager
:
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.2340] audit: op="connection-activate" uuid="ffc0be21-f339-4781-9868-c36d8bd08860" name="VPN connection 1" pid=2325 uid=1000 result="success"
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.2375] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: Started the VPN service, PID 3857
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.2428] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: Saw the service appear; activating connection
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.3015] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: VPN connection: (ConnectInteractive) reply received
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.3270] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: VPN plugin: state changed: starting (3)
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: Plugin /usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so loaded.
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: Using interface ppp0
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: Connect: ppp0 <--> /dev/pts/1
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.3338] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/4)
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.3411] devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 8 08:33:42 pc-2019 NetworkManager[1027]: <info> [1586327622.3411] device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: CHAP authentication succeeded
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: MPPE 128-bit stateless compression enabled
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: local IP address 192.168.178.231
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: remote IP address 192.168.178.81
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: primary DNS address 1.1.1.1
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: secondary DNS address 1.1.1.1
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4665] device (ppp0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4673] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: VPN connection: (IP4 Config Get) reply received from old-style plugin
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4678] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: VPN Gateway: 213.233.219.244
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4678] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Tunnel Device: "ppp0"
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4678] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: IPv4 configuration:
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4678] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Internal Address: 192.168.178.231
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4678] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Internal Prefix: 32
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4679] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Internal Point-to-Point Address: 192.168.178.81
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4679] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Static Route: 192.168.178.81/32 Next Hop: 0.0.0.0
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4679] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: Internal DNS: 1.1.1.1
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4679] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: DNS Domain: '(none)'
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4679] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: Data: No IPv6 configuration
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4680] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: VPN plugin: state changed: started (4)
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4680] device (ppp0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external')
Apr 8 08:33:43 pc-2019 NetworkManager[1027]: <info> [1586327623.4695] vpn-connection[0x55de7e6cc2e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",4:(ppp0)]: VPN connection: (IP Config Get) complete
Apr 8 08:33:43 pc-2019 dbus-daemon[1004]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=1027 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
我没有上个月的系统日志了,因为它已经是 7 天前的事了,所以我无法比较它从哪个步骤开始不同。
syslog
禁用我的 vpn 时(请注意Sent 0 bytes
):
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: <info> [1586331863.7062] audit: op="connection-deactivate" uuid="ffc0be21-f339-4781-9868-c36d8bd08860" name="VPN connection 1" pid=2325 uid=1000 result="success"
Apr 8 09:44:23 pc-2019 dbus-daemon[1004]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=1027 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: Terminating on signal 15
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: Connect time 8.3 minutes.
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: Sent 0 bytes, received 4546 bytes.
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: MPPE disabled
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: Child process /usr/sbin/pptp 213.233.219.244 --nolaunchpppd --loglevel 0 --logstring nm-pptp-service-8228 (pid 8239) terminated with signal 15
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: <info> [1586331863.7090] vpn-connection[0x55de7e6cc6e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: VPN plugin: state changed: stopping (5)
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: <info> [1586331863.7090] vpn-connection[0x55de7e6cc6e0,ffc0be21-f339-4781-9868-c36d8bd08860,"VPN connection 1",0]: VPN plugin: state changed: stopped (6)
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: <info> [1586331863.7099] device (ppp0): state change: disconnected -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: Connection terminated.
Apr 8 09:44:23 pc-2019 NetworkManager[1027]: <info> [1586331863.7298] devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
知道如何解决这个问题吗?
[按照要求]:
mark@pc-2019:~$ ip r
default via 192.168.1.1 dev enp34s0 proto dhcp metric 100
169.254.0.0/16 dev enp34s0 scope link metric 1000
192.168.1.0/24 dev enp34s0 proto kernel scope link src 192.168.1.23 metric 100
213.233.219.244 via 192.168.1.1 dev enp34s0 src 192.168.1.23
mark@pc-2019:~$ ip r
default via 192.168.1.1 dev enp34s0 proto dhcp metric 100
169.254.0.0/16 dev enp34s0 scope link metric 1000
192.168.1.0/24 dev enp34s0 proto kernel scope link src 192.168.1.23 metric 100
192.168.1.1 dev enp34s0 proto static scope link metric 100
192.168.178.81 dev ppp0 proto kernel scope link src 192.168.178.245 metric 50
213.233.219.244 via 192.168.1.1 dev enp34s0 src 192.168.1.23
213.233.219.244 via 192.168.1.1 dev enp34s0 proto static metric 100
注意:enp34s0 = 本地适配器(类似于 eth0)