OpenVPN reconnecting

 ( mraacz | 2018. október 28., vasárnap - 21:45 )

Amióta bionic-os elementary-t (Juno 5.0) feltettem, időnként megszakad a az OpenVPN kapcsolat. Mivel a szerver még a régi verziójú, a bionicban (és a 2.4-es OpenVPN-hez) pedig már 1.1-es OpenSSL-van, kellett kicsit bűvészkedni ahhoz, hogy a kapcsolat egyáltalán létrejöjjön. A szakadás valhogy így néz ki:


who@who-ThinkPad-T440s:~$ cat /var/log/syslog | grep VPN
Oct 28 13:05:51 who-ThinkPad-T440s systemd[1]: Starting OpenVPN service...
Oct 28 13:05:51 who-ThinkPad-T440s systemd[1]: Started OpenVPN service.
Oct 28 13:06:52 who-ThinkPad-T440s NetworkManager[791]: [1540728412.8255] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: Started the VPN service, PID 2368
Oct 28 13:06:52 who-ThinkPad-T440s wingpanel[2028]: VpnMenuItem.vala:93: An VPN is being connected but not active.
Oct 28 13:06:52 who-ThinkPad-T440s NetworkManager[791]: [1540728412.9242] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN plugin: state changed: starting (3)
Oct 28 13:06:52 who-ThinkPad-T440s NetworkManager[791]: [1540728412.9245] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN connection: (ConnectInteractive) reply received
Oct 28 13:06:52 who-ThinkPad-T440s nm-openvpn[2374]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2018
Oct 28 13:06:54 who-ThinkPad-T440s NetworkManager[791]: [1540728414.3584] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN connection: (IP Config Get) reply received.
Oct 28 13:06:54 who-ThinkPad-T440s NetworkManager[791]: [1540728414.3600] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",4:(tun0)]: VPN connection: (IP4 Config Get) reply received
Oct 28 13:06:54 who-ThinkPad-T440s NetworkManager[791]: [1540728414.3608] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",4:(tun0)]: Data: VPN Gateway: 192.168.1.1
Oct 28 13:06:54 who-ThinkPad-T440s NetworkManager[791]: [1540728414.3616] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",4:(tun0)]: VPN plugin: state changed: started (4)
Oct 28 13:06:54 who-ThinkPad-T440s NetworkManager[791]: [1540728414.3679] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",4:(tun0)]: VPN connection: (IP Config Get) complete
Oct 28 14:07:10 who-ThinkPad-T440s NetworkManager[791]: [1540732030.5345] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN plugin: state changed: stopping (5)
Oct 28 14:07:10 who-ThinkPad-T440s NetworkManager[791]: [1540732030.5345] vpn-connection[0x557e962740d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN plugin: state changed: stopped (6)
Oct 28 14:07:10 who-ThinkPad-T440s NetworkManager[791]: [1540732030.6076] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: Started the VPN service, PID 4876
Oct 28 14:07:10 who-ThinkPad-T440s wingpanel[2028]: VpnMenuItem.vala:93: An VPN is being connected but not active.
Oct 28 14:07:10 who-ThinkPad-T440s nm-openvpn[4922]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2018
Oct 28 14:07:10 who-ThinkPad-T440s NetworkManager[791]: [1540732030.7486] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN plugin: state changed: starting (3)
Oct 28 14:07:10 who-ThinkPad-T440s NetworkManager[791]: [1540732030.7487] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN connection: (ConnectInteractive) reply received
Oct 28 14:07:12 who-ThinkPad-T440s NetworkManager[791]: [1540732032.5792] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",0]: VPN connection: (IP Config Get) reply received.
Oct 28 14:07:12 who-ThinkPad-T440s NetworkManager[791]: [1540732032.5809] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",5:(tun0)]: VPN connection: (IP4 Config Get) reply received
Oct 28 14:07:12 who-ThinkPad-T440s NetworkManager[791]: [1540732032.5819] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",5:(tun0)]: Data: VPN Gateway: 192.168.1.1
Oct 28 14:07:12 who-ThinkPad-T440s NetworkManager[791]: [1540732032.5821] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",5:(tun0)]: VPN plugin: state changed: started (4)
Oct 28 14:07:12 who-ThinkPad-T440s NetworkManager[791]: [1540732032.5835] vpn-connection[0x557e962742d0,22c367e9-b675-4296-98a6-ededba242b77,"VPN-connection",5:(tun0)]: VPN connection: (IP Config Get) complete

Az OpenVPN config valahogy így néz ki (manuálisan szoktam a NetworkManagerben beállítani, ez az exportja):


client
remote 'my.ip-add.hu'
ca '/home/who/.keys/ca-cert.pem'
cert '/home/who/.keys/client-who-cert.pem'
key '/home/who/.keys/client-who-key.pem'
auth-user-pass
tls-cipher 'DEFAULT:@SECLEVEL=0'
comp-lzo adaptive
dev tun
proto udp
nobind
auth-nocache
script-security 2
persist-key
persist-tun
user nm-openvpn
group nm-openvpn

Van valami tippetek, hogy mitől lehet a megszakadás?

Hozzászólás megjelenítési lehetőségek

A választott hozzászólás megjelenítési mód a „Beállítás” gombbal rögzíthető.

Ahogy nézem, ez a NetworkManager logja - ami kiír, amit kiír az OpenVPN üzeneteiből, amit meg esetleg mégse, azt találd ki...
Első lépésben szerintem kézből indítsd el az OpenVPN-t és nézd meg annak a logját.
Ezen felül ha megoldható, akkor lehet hasznos a szerver oldali log is.