Opened 6 years ago

Last modified 6 years ago

#1073 assigned Bug / Defect

Linux: VPN is unavailable and connection does not terminate

Reported by: sakikoman Owned by: David Sommerseth
Priority: minor Milestone: release 2.4.4
Component: Networking Version: OpenVPN 2.4.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: connection, network unavailability
Cc: sakikoman@…

Description

After some time, the connection is broken. «Connection» isn't automatically restored and after reconnecting to the VPN server too. Connection to the VPN server (during reconnection) occurs, but the network is unavailable.

Requirements

Have a VPN connection in network-manager-openvpn (plug-in for network manager).

Steps to reproduce

  • Connect to the VPN-network (in my case, it happens automatically and IPv4/IPv6 are configured to use resources on the network).
  • After some time (from 2 to 4 hours), the VPN connection stops working, but we remain connected to it (!).
  • Reconnect manually VPN.

Observed Behavior

Connection is not lost.

Expected Behavior

VPN does not work, and reconnection does not help.

How to fix it

  • Disconnect the WiFi? connection and reconnect to the WiFi?
  • Connect to the VPN (I have it automatically)

Environment

  • OpenVPN 2.4.4ubuntu1, latest from Ubuntu repository

Logs in systemlog:

$ grep VPN /var/log/syslog

Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8280] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 192.168.228.0/22   Next Hop: 0.0.0.0
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8281] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Internal DNS: 74.82.42.42
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8281] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Internal DNS: 77.88.8.8
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8281] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   DNS Domain: '(none)'
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8281] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data: IPv6 configuration:
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8282] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Internal Address: 2a00:1838:30:7110::12f2
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8282] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Internal Prefix: 112
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8282] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Internal Point-to-Point Address: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8283] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:1838:36:67::3d86/64   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8283] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:1838:35:80::8432/64   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8283] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2001:678:384::/48   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8284] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2620:10f:d000::/44   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8284] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a02:6b8::/32   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8284] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a02:5180::/32   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8285] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:1148::/32   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8285] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:a300::/32   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8285] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:b4c0::/32   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8286] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a04:4b40::/29   Next Hop: 2a00:1838:30:7110::1
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8286] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:1838:30:7110::12f2/128   Next Hop: ::
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8286] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   Static Route: 2a00:1838:30:7110::1/128   Next Hop: ::
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8287] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: Data:   DNS Domain: '(none)'
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8288] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: VPN plugin: state changed: started (4)
Jun 30 13:32:06 emerald NetworkManager[587]: <info>  [1530354726.8442] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",4:(tun0)]: VPN connection: (IP Config Get) complete
Jun 30 20:33:43 emerald NetworkManager[587]: <info>  [1530380023.0278] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: VPN plugin: state changed: stopping (5)
Jun 30 20:33:43 emerald NetworkManager[587]: <info>  [1530380023.4267] vpn-connection[0x563f19fa0110,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: VPN plugin: state changed: stopped (6)
Jun 30 20:33:46 emerald NetworkManager[587]: <info>  [1530380026.1654] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: Started the VPN service, PID 8411
Jun 30 20:33:46 emerald NetworkManager[587]: <info>  [1530380026.2005] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: Saw the service appear; activating connection
Jun 30 20:33:46 emerald NetworkManager[587]: <info>  [1530380026.2568] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: VPN plugin: state changed: starting (3)
Jun 30 20:33:46 emerald NetworkManager[587]: <info>  [1530380026.2579] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: VPN connection: (ConnectInteractive) reply received
Jun 30 20:33:46 emerald nm-openvpn[8415]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 10 2018
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1014] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",0]: VPN connection: (IP Config Get) reply received.
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1108] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: VPN connection: (IP4 Config Get) reply received
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1227] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: VPN connection: (IP6 Config Get) reply received
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1246] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data: VPN Gateway: 94.242.59.156
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1247] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data: Tunnel Device: "tun0"
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1247] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data: IPv4 configuration:
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1248] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data:   Internal Gateway: 192.168.228.1
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1248] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data:   Internal Address: 192.168.228.90
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1248] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data:   Internal Prefix: 22
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1249] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data:   Internal Point-to-Point Address: 192.168.228.90
Jun 30 20:33:55 emerald NetworkManager[587]: <info>  [1530380035.1249] vpn-connection[0x563f19fa0310,0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN",5:(tun0)]: Data:   Static Route: 74.82.42.42/32   Next Hop: 192.168.228.1

Change History (4)

comment:1 Changed 6 years ago by sakikoman

It happened again. After that, there is a loss of connection:

Jun 30 21:17:54 emerald NetworkManager[587]: <info>  [1530382674.6874] settings-connection[0x563f19e49360,0f21dc01-4103-4a84-a3f9-73f70e6478fc]: write: successfully commited (keyfile: update /etc/NetworkManager/system-connections/VK VPN (0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN"))
Jun 30 21:19:07 emerald NetworkManager[587]: <info>  [1530382747.8749] settings-connection[0x563f19e49360,0f21dc01-4103-4a84-a3f9-73f70e6478fc]: write: successfully updated (keyfile: update /etc/NetworkManager/system-connections/VK VPN (0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN"))
Jun 30 21:19:07 emerald NetworkManager[587]: <info>  [1530382747.8783] audit: op="connection-update" uuid="0f21dc01-4103-4a84-a3f9-73f70e6478fc" name="VK VPN" args="connection.timestamp,ipv6.method" pid=9026 uid=1000 result="success"
Jun 30 22:17:19 emerald NetworkManager[587]: <info>  [1530386239.2831] settings-connection[0x563f19e49360,0f21dc01-4103-4a84-a3f9-73f70e6478fc]: write: successfully commited (keyfile: update /etc/NetworkManager/system-connections/VK VPN (0f21dc01-4103-4a84-a3f9-73f70e6478fc,"VK VPN"))
Last edited 6 years ago by sakikoman (previous) (diff)

comment:2 Changed 6 years ago by Gert Döring

Owner: set to David Sommerseth
Priority: criticalminor
Status: newassigned

@dazo, any idea how to diagnose this? NM seems to log interesting things, but not the OpenVPN log.

comment:3 Changed 6 years ago by tct

tct

comment:4 Changed 6 years ago by Antonio Quartulli

where is the OpenVPN log? maybe that could help understanding some more what is happening exactly?
Looking at the NM log it seems to me like the second connection does not receive all the routes/ips. or maybe the log is just incomplete.

Note: See TracTickets for help on using tickets.