Ubuntu 16.04 上的 vpn 与 dhclient 冲突

Ubuntu 16.04 上的 vpn 与 dhclient 冲突

我试图始终在 Ubuntu 桌面上运行 VPN 互联网连接。我发现,当dhclient定期运行 VPN(可能是为了续订我的 DHCP 租约)时,情况会变得很糟糕,机器没有任何互联网连接。我通过重新启动解决了这个问题。这个问题仅在 VPN 运行时才会发生,所以我假设问题就出在这里。

我最初的想法是使用进入/退出钩子来关闭/打开 VPN dhclient,但我愿意接受其他/更好的解决方案。附加日志。

Apr 28 05:26:52 UB dhclient[1242]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 69.252.97.6 port 67 (xid=0x10daacd5)
Apr 28 05:26:52 UB dhclient[1242]: DHCPACK of 24.5.188.10 from 69.252.97.6
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8270]   address 24.5.188.10
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8271]   plen 20 (255.255.240.0)
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8271]   gateway 24.5.176.1
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8272]   server identifier 69.252.97.6
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8272]   lease time 345380
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8273]   hostname 'UB'
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8273]   nameserver '75.75.75.75'
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8274]   nameserver '75.75.76.76'
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8274]   domain name 'hsd1.ca.comcast.net.'
Apr 28 05:26:52 UB NetworkManager[841]: <info>  [1493382412.8275] dhcp4 (enp2s0): state changed bound -> bound
Apr 28 05:26:52 UB dbus[798]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Apr 28 05:26:52 UB dhclient[1242]: bound to 24.5.188.10 -- renewal in 162391 seconds.
Apr 28 05:26:52 UB systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 28 05:26:52 UB dbus[798]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 28 05:26:52 UB systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 28 05:26:52 UB nm-dispatcher: req:1 'dhcp4-change' [enp2s0]: new request (1 scripts)
Apr 28 05:26:52 UB nm-dispatcher: req:1 'dhcp4-change' [enp2s0]: start running ordered scripts...
Apr 28 05:26:58 UB dnsmasq-dhcp[1209]: DHCPREQUEST(enp3s0) 10.42.0.137 30:8c:fb:85:67:14
Apr 28 05:26:58 UB dnsmasq-dhcp[1209]: DHCPACK(enp3s0) 10.42.0.137 30:8c:fb:85:67:14
Apr 28 05:27:36 UB dnsmasq-dhcp[1209]: DHCPREQUEST(enp3s0) 10.42.0.70 ec:66:d1:01:f8:41
Apr 28 05:27:36 UB dnsmasq-dhcp[1209]: DHCPACK(enp3s0) 10.42.0.70 ec:66:d1:01:f8:41
Apr 28 05:28:07 UB dnsmasq-dhcp[1209]: DHCPREQUEST(enp3s0) 10.42.0.211 c8:69:cd:41:cb:e0
Apr 28 05:28:07 UB dnsmasq-dhcp[1209]: DHCPACK(enp3s0) 10.42.0.211 c8:69:cd:41:cb:e0 Apple-TV-8
Apr 28 05:28:27 UB dnsmasq-dhcp[1209]: DHCPREQUEST(enp3s0) 10.42.0.211 c8:69:cd:41:cb:e0
Apr 28 05:28:27 UB dnsmasq-dhcp[1209]: DHCPACK(enp3s0) 10.42.0.211 c8:69:cd:41:cb:e0 Apple-TV-8
Apr 28 05:29:19 UB dnsmasq-dhcp[1209]: BOOTP(enp3s0) 00:21:b7:91:00:ea no address configured
Apr 28 05:29:19 UB dnsmasq-dhcp[1209]: BOOTP(enp3s0) 00:21:b7:91:00:ea no address configured
Apr 28 05:29:22 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:29:22 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:29:26 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:29:26 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:29:34 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:29:34 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:32:53 UB NetworkManager[841]: <info>  [1493382773.6997] device (enp2s0): link disconnected (deferring action for 4 seconds)
Apr 28 05:32:53 UB kernel: [143121.130149] r8169 0000:02:00.0 enp2s0: link down
Apr 28 05:32:53 UB systemd[1]: snapd.refresh.timer: Adding 1h 17min 7.397693s random time.
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8110] device (enp2s0): link disconnected (calling deferred action)
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8118] device (enp2s0): state change: activated -> unavailable (reason 'carrier-changed') [100 20 40]
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8451] dhcp4 (enp2s0): canceled DHCP transaction, DHCP client pid 1242
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8452] dhcp4 (enp2s0): state changed bound -> done
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8465] dhcp6 (enp2s0): canceled DHCP transaction, DHCP client pid 1674
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8465] dhcp6 (enp2s0): state changed bound -> done
Apr 28 05:32:57 UB avahi-daemon[795]: Withdrawing address record for 24.5.188.10 on enp2s0.
Apr 28 05:32:57 UB avahi-daemon[795]: Leaving mDNS multicast group on interface enp2s0.IPv4 with address 24.5.188.10.
Apr 28 05:32:57 UB avahi-daemon[795]: Interface enp2s0.IPv4 no longer relevant for mDNS.
Apr 28 05:32:57 UB avahi-daemon[795]: Withdrawing address record for 2001:558:6045:bf:393a:c4b4:7335:5239 on enp2s0.
Apr 28 05:32:57 UB avahi-daemon[795]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address 2001:558:6045:bf:393a:c4b4:7335:5239.
Apr 28 05:32:57 UB avahi-daemon[795]: Joining mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:32:57 UB avahi-daemon[795]: Registering new address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.*.
Apr 28 05:32:57 UB avahi-daemon[795]: Withdrawing address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.
Apr 28 05:32:57 UB avahi-daemon[795]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:32:57 UB avahi-daemon[795]: Interface enp2s0.IPv6 no longer relevant for mDNS.
Apr 28 05:32:57 UB NetworkManager[841]: <info>  [1493382777.8525] dns-mgr: Writing DNS information to /sbin/resolvconf
Apr 28 05:32:57 UB dnsmasq[1318]: setting upstream servers from DBus
Apr 28 05:32:57 UB dnsmasq[1318]: using nameserver 8.8.8.8#53
Apr 28 05:32:57 UB dnsmasq[1318]: using nameserver 8.8.4.4#53
Apr 28 05:32:57 UB dnsmasq[1209]: reading /etc/resolv.conf
Apr 28 05:32:57 UB dnsmasq[1209]: using nameserver 127.0.1.1#53
Apr 28 05:32:57 UB dnsmasq[1209]: cleared cache
Apr 28 05:33:00 UB kernel: [143127.509123] r8169 0000:02:00.0 enp2s0: link up
Apr 28 05:33:07 UB systemd[1]: Reloading LSB: Postfix Mail Transport Agent.
Apr 28 05:33:07 UB postfix[17186]:  * Reloading Postfix configuration...
Apr 28 05:33:07 UB postfix[17190]: Postfix is running with backwards-compatible default settings
Apr 28 05:33:07 UB postfix[17190]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Apr 28 05:33:07 UB postfix[17190]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Apr 28 05:33:07 UB postfix/master[2114]: reload -- version 3.1.0, configuration /etc/postfix
Apr 28 05:33:07 UB postfix[17186]:    ...done.
Apr 28 05:33:07 UB systemd[1]: Reloaded LSB: Postfix Mail Transport Agent.
Apr 28 05:33:07 UB NetworkManager[841]: <info>  [1493382787.9554] dns-mgr: Writing DNS information to /sbin/resolvconf
Apr 28 05:33:07 UB dnsmasq[1318]: setting upstream servers from DBus
Apr 28 05:33:07 UB dnsmasq[1318]: using nameserver 8.8.8.8#53
Apr 28 05:33:07 UB dnsmasq[1318]: using nameserver 8.8.4.4#53
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 2 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0142] dns-mgr: Writing DNS information to /sbin/resolvconf
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 49 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB NetworkManager[841]: nm-openvpn-Message: openvpn[7148]: send SIGTERM
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB kernel: [143135.464571] IPv6: ADDRCONF(NETDEV_UP): tun0: link is not ready
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 2 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0286] vpn-connection[0x278c1e0,5587a2f5-130f-4193-acfa-396a698f6f2b,"ipvanish-US-San-Jose-sjc-a12",0]: VPN plugin: state changed: stopping (5)
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0286] vpn-connection[0x278c1e0,5587a2f5-130f-4193-acfa-396a698f6f2b,"ipvanish-US-San-Jose-sjc-a12",0]: VPN plugin: state changed: stopped (6)
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0298] device (enp2s0): link connected
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0331] device (tun0): state change: activated -> unmanaged (reason 'connection-assumed') [100 10 41]
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0334] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 24 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB dnsmasq[1318]: setting upstream servers from DBus
Apr 28 05:33:08 UB systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 155 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.0729] device (enp2s0): state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 55 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB dbus[798]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: SIGTERM received, sending exit notification to peer
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 32 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB dbus[798]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 28 05:33:08 UB nm-dispatcher: req:1 'vpn-down' [tun0]: new request (1 scripts)
Apr 28 05:33:08 UB nm-dispatcher: req:1 'vpn-down' [tun0]: start running ordered scripts...
Apr 28 05:33:08 UB nm-dispatcher: req:2 'down' [enp2s0]: new request (1 scripts)
Apr 28 05:33:08 UB nm-dispatcher: req:3 'down' [tun0]: new request (1 scripts)
Apr 28 05:33:08 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:08 UB nm-openvpn[7148]: message repeated 168 times: [ write UDPv4: Network is unreachable (code=101)]
Apr 28 05:33:08 UB nm-dispatcher: req:2 'down' [enp2s0]: start running ordered scripts...
Apr 28 05:33:08 UB nm-dispatcher: req:3 'down' [tun0]: start running ordered scripts...
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1286] policy: auto-activating connection 'Built-in ethernet'
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1302] device (enp2s0): Activation: starting connection 'Built-in ethernet' (91c9448c-6ed0-3a75-8724-25adc0f0819d)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1338] device (enp2s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1339] manager: NetworkManager state is now CONNECTING
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1344] device (enp2s0): state change: prepare -> config (reason 'none') [40 50 0]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1350] device (enp2s0): state change: config -> ip-config (reason 'none') [50 70 0]
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1354] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 28 05:33:08 UB NetworkManager[841]: <info>  [1493382788.1399] dhcp4 (enp2s0): dhclient started with pid 17250
Apr 28 05:33:08 UB gnome-session[1645]: (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent
Apr 28 05:33:08 UB gnome-session[1645]: message repeated 3 times: [ (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent]
Apr 28 05:33:08 UB dhclient[17250]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x1be24cda)
Apr 28 05:33:08 UB gnome-session[1645]: (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 28 05:33:08 UB gnome-session[1645]: message repeated 3 times: [ (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed]
Apr 28 05:33:09 UB nm-openvpn[7148]: write UDPv4: Network is unreachable (code=101)
Apr 28 05:33:09 UB avahi-daemon[795]: Joining mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:33:09 UB avahi-daemon[795]: New relevant interface enp2s0.IPv6 for mDNS.
Apr 28 05:33:09 UB avahi-daemon[795]: Registering new address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.*.
Apr 28 05:33:10 UB NetworkManager[841]: nm-openvpn-Message: openvpn[7148]: send SIGKILL
Apr 28 05:33:10 UB NetworkManager[841]: <info>  [1493382790.0307] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
Apr 28 05:33:10 UB NetworkManager[841]: (nm-openvpn-service:7141): nm-openvpn-WARNING **: openvpn[7148] died with signal 9
Apr 28 05:33:11 UB dhclient[17250]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x1be24cda)
Apr 28 05:33:12 UB whoopsie[782]: [05:33:12] Cannot reach: https://daisy.ubuntu.com
Apr 28 05:33:12 UB whoopsie[782]: [05:33:12] offline
Apr 28 05:33:14 UB dhclient[17250]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x1be24cda)
Apr 28 05:33:18 UB dhclient[17250]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x1be24cda)
Apr 28 05:33:25 UB dhclient[17250]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 3 (xid=0x25a94a35)
Apr 28 05:33:28 UB dhclient[17250]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 8 (xid=0x25a94a35)
Apr 28 05:33:36 UB dhclient[17250]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 20 (xid=0x25a94a35)
Apr 28 05:33:40 UB kernel: [143168.263079] r8169 0000:02:00.0 enp2s0: link down
Apr 28 05:33:40 UB NetworkManager[841]: <info>  [1493382820.8325] device (enp2s0): link disconnected (deferring action for 4 seconds)
Apr 28 05:33:44 UB NetworkManager[841]: <info>  [1493382824.8129] device (enp2s0): link disconnected (calling deferred action)
Apr 28 05:33:44 UB NetworkManager[841]: <info>  [1493382824.8136] device (enp2s0): state change: ip-config -> unavailable (reason 'carrier-changed') [70 20 40]
Apr 28 05:33:44 UB NetworkManager[841]: <info>  [1493382824.8304] dhcp4 (enp2s0): canceled DHCP transaction, DHCP client pid 17250
Apr 28 05:33:44 UB NetworkManager[841]: <info>  [1493382824.8305] dhcp4 (enp2s0): state changed unknown -> done
Apr 28 05:33:44 UB avahi-daemon[795]: Withdrawing address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.
Apr 28 05:33:44 UB avahi-daemon[795]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:33:44 UB avahi-daemon[795]: Interface enp2s0.IPv6 no longer relevant for mDNS.
Apr 28 05:33:44 UB NetworkManager[841]: <info>  [1493382824.8319] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 28 05:33:44 UB gnome-session[1645]: (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 28 05:33:44 UB gnome-session[1645]: message repeated 3 times: [ (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed]
Apr 28 05:34:53 UB dnsmasq-dhcp[1209]: BOOTP(enp3s0) 00:21:b7:91:00:ea no address configured
Apr 28 05:34:53 UB dnsmasq-dhcp[1209]: BOOTP(enp3s0) 00:21:b7:91:00:ea no address configured
Apr 28 05:34:56 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:34:56 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:35:00 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:35:00 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:35:08 UB dnsmasq-dhcp[1209]: DHCPDISCOVER(enp3s0) 169.254.1.107 00:21:b7:91:00:ea
Apr 28 05:35:08 UB dnsmasq-dhcp[1209]: DHCPOFFER(enp3s0) 10.42.0.231 00:21:b7:91:00:ea
Apr 28 05:35:43 UB kernel: [143290.822729] r8169 0000:02:00.0 enp2s0: link up
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.3923] device (enp2s0): link connected
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.3934] device (enp2s0): state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.3956] policy: auto-activating connection 'Built-in ethernet'
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4000] device (enp2s0): Activation: starting connection 'Built-in ethernet' (91c9448c-6ed0-3a75-8724-25adc0f0819d)
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4058] device (enp2s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4059] manager: NetworkManager state is now CONNECTING
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4064] device (enp2s0): state change: prepare -> config (reason 'none') [40 50 0]
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4067] device (enp2s0): state change: config -> ip-config (reason 'none') [50 70 0]
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4071] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 28 05:35:43 UB NetworkManager[841]: <info>  [1493382943.4095] dhcp4 (enp2s0): dhclient started with pid 17279
Apr 28 05:35:43 UB gnome-session[1645]: (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent
Apr 28 05:35:43 UB gnome-session[1645]: (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent
Apr 28 05:35:43 UB dhclient[17279]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x548aa40d)
Apr 28 05:35:43 UB gnome-session[1645]: (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent
Apr 28 05:35:43 UB gnome-session[1645]: (nm-applet:1882): Gtk-WARNING **: Can't set a parent on widget which has a parent
Apr 28 05:35:43 UB gnome-session[1645]: (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 28 05:35:43 UB gnome-session[1645]: message repeated 3 times: [ (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed]
Apr 28 05:35:45 UB avahi-daemon[795]: Joining mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:35:45 UB avahi-daemon[795]: New relevant interface enp2s0.IPv6 for mDNS.
Apr 28 05:35:45 UB avahi-daemon[795]: Registering new address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.*.
Apr 28 05:35:45 UB NetworkManager[841]: <info>  [1493382945.9558] dhcp6 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Apr 28 05:35:45 UB NetworkManager[841]: <info>  [1493382945.9595] dhcp6 (enp2s0): dhclient started with pid 17288
Apr 28 05:35:45 UB whoopsie[782]: [05:35:45] Cannot reach: https://daisy.ubuntu.com
Apr 28 05:35:46 UB dhclient[17279]: DHCPREQUEST of 24.5.188.10 on enp2s0 to 255.255.255.255 port 67 (xid=0x548aa40d)
Apr 28 05:35:46 UB dhclient[17288]: XMT: Confirm on enp2s0, interval 1070ms.
Apr 28 05:35:46 UB whoopsie[782]: [05:35:46] Cannot reach: https://daisy.ubuntu.com
Apr 28 05:35:47 UB dhclient[17288]: XMT: Confirm on enp2s0, interval 2190ms.
Apr 28 05:35:49 UB dhclient[17288]: XMT: Confirm on enp2s0, interval 4330ms.
Apr 28 05:35:54 UB dhclient[17279]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 3 (xid=0x660d7810)
Apr 28 05:35:54 UB dhclient[17288]: XMT: Confirm on enp2s0, interval 2410ms.
Apr 28 05:35:56 UB dhclient[17288]: Max retransmission duration exceeded.
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5971]   valid_lft 345600
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5978]   preferred_lft 345600
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5979]   address 2001:558:6045:bf:393a:c4b4:7335:5239
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5979]   nameserver '2001:558:feed::1'
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5980]   nameserver '2001:558:feed::2'
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.5980] dhcp6 (enp2s0): state changed unknown -> bound, event ID="7e:b4:3e:ff|1493336309"
Apr 28 05:35:56 UB whoopsie[782]: [05:35:56] Cannot reach: https://daisy.ubuntu.com
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6015] device (enp2s0): state change: ip-config -> ip-check (reason 'none') [70 80 0]
Apr 28 05:35:56 UB dbus[798]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6033] device (enp2s0): state change: ip-check -> secondaries (reason 'none') [80 90 0]
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6040] device (enp2s0): state change: secondaries -> activated (reason 'none') [90 100 0]
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6044] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 28 05:35:56 UB systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 28 05:35:56 UB dbus[798]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 28 05:35:56 UB systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 28 05:35:56 UB nm-dispatcher: req:1 'dhcp6-change' [enp2s0]: new request (1 scripts)
Apr 28 05:35:56 UB nm-dispatcher: req:1 'dhcp6-change' [enp2s0]: start running ordered scripts...
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6493] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6496] policy: set 'Built-in ethernet' (enp2s0) as default for IPv6 routing and DNS
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6500] dns-mgr: Writing DNS information to /sbin/resolvconf
Apr 28 05:35:56 UB dnsmasq[1318]: setting upstream servers from DBus
Apr 28 05:35:56 UB dnsmasq[1318]: using nameserver 2001:558:feed::1#53
Apr 28 05:35:56 UB dnsmasq[1318]: using nameserver 2001:558:feed::2#53
Apr 28 05:35:56 UB NetworkManager[841]: <info>  [1493382956.6659] device (enp2s0): Activation: successful, device activated.
Apr 28 05:35:56 UB nm-dispatcher: req:2 'up' [enp2s0]: new request (1 scripts)
Apr 28 05:35:56 UB nm-dispatcher: req:2 'up' [enp2s0]: start running ordered scripts...
Apr 28 05:35:56 UB whoopsie[782]: [05:35:56] The default IPv6 route is: /org/freedesktop/NetworkManager/ActiveConnection/5
Apr 28 05:35:56 UB whoopsie[782]: [05:35:56] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/5
Apr 28 05:35:56 UB whoopsie[782]: [05:35:56] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/5
Apr 28 05:35:56 UB gnome-session[1645]: (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 28 05:35:56 UB gnome-session[1645]: message repeated 3 times: [ (nm-applet:1882): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed]
Apr 28 05:35:56 UB systemd[1]: Reloading OpenBSD Secure Shell server.
Apr 28 05:35:56 UB systemd[1]: Reloaded OpenBSD Secure Shell server.
Apr 28 05:35:57 UB gnome-session[1645]: (deja-dup-monitor:2359): GLib-CRITICAL **: Source ID 126 was not found when attempting to remove it
Apr 28 05:35:57 UB dhclient[17279]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 4 (xid=0x660d7810)
Apr 28 05:35:58 UB avahi-daemon[795]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fe80::17a8:5da8:40ba:4d2b.
Apr 28 05:35:58 UB avahi-daemon[795]: Joining mDNS multicast group on interface enp2s0.IPv6 with address 2001:558:6045:bf:393a:c4b4:7335:5239.
Apr 28 05:35:58 UB avahi-daemon[795]: Registering new address record for 2001:558:6045:bf:393a:c4b4:7335:5239 on enp2s0.*.
Apr 28 05:35:58 UB avahi-daemon[795]: Withdrawing address record for fe80::17a8:5da8:40ba:4d2b on enp2s0.
Apr 28 05:36:01 UB dhclient[17279]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 7 (xid=0x660d7810)
Apr 28 05:36:08 UB dhclient[17279]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 15 (xid=0x660d7810)
Apr 28 05:36:17 UB whoopsie[782]: [05:36:17] Cannot reach: https://daisy.ubuntu.com
Apr 28 05:36:23 UB dhclient[17279]: DHCPDISCOVER on enp2s0 to 255.255.255.255 port 67 interval 13 (xid=0x660d7810)
Apr 28 05:36:28 UB NetworkManager[841]: <warn>  [1493382988.8106] dhcp4 (enp2s0): request timed out
Apr 28 05:36:28 UB NetworkManager[841]: <info>  [1493382988.8106] dhcp4 (enp2s0): state changed unknown -> timeout
Apr 28 05:36:28 UB NetworkManager[841]: <info>  [1493382988.8275] dhcp4 (enp2s0): canceled DHCP transaction, DHCP client pid 17279
Apr 28 05:36:28 UB NetworkManager[841]: <info>  [1493382988.8276] dhcp4 (enp2s0): state changed timeout -> done
Apr 28 05:36:29 UB whoopsie[782]: [05:36:29] Cannot reach: https://daisy.ubuntu.com

这是路由表(enp2s0 上为互联网,enp3s0 上为 LAN):

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         172.21.22.1     0.0.0.0         UG    50     0        0 tun0
    0.0.0.0         24.5.176.1      0.0.0.0         UG    100    0        0 enp2s0
    10.42.0.0       0.0.0.0         255.255.255.0   U     100    0        0 enp3s0
    24.5.176.0      0.0.0.0         255.255.240.0   U     100    0        0 enp2s0
    69.252.97.6     24.5.176.1      255.255.255.255 UGH   100    0        0 enp2s0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp3s0
    172.21.22.0     0.0.0.0         255.255.254.0   U     50     0        0 tun0
    216.151.183.10  24.5.176.1      255.255.255.255 UGH   100    0        0 enp2s0

答案1

安装network-manager-opnevpn-gnome。然后您将能够通过 NetworkManager 在“网络设置”上配置 OpenVPN。

相关内容