I experienced that my connection from Windows to the remote network worked fine for a while then suddenly stopped operating even though the connection seemingly was still active as witnessed by the color on the OpenVpn-GUI tray icon.
It has been going on for a while, like a week or so, so today I used another OpenVPN channel (an RPi3 fallback server) into the same network and then connected by PuTTY to the main (Ubuntu 18 LTS) OpenVpn server.
In the openvpn log I found this type of logging (identifications edited out):
Sun Dec 15 00:17:00 2019 us=86753 BosseB_AGI/176.10.164.48:52950 TLS: soft reset sec=0 bytes=27414/-1 pkts=702/0
Sun Dec 15 00:17:00 2019 us=425227 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=1, --- identification removed --- CN=rpi3-agivpn, name=rpi3-agivpn, --- identification removed ---
Sun Dec 15 00:17:00 2019 us=425665 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=0, --- identification removed --- CN=BosseB_AGI, name=BosseB_AGI, --- identification removed ---
Sun Dec 15 00:17:00 2019 us=570245 BosseB_AGI/176.10.164.48:52950 peer info: IV_VER=2.4.7
Sun Dec 15 00:17:00 2019 us=570316 BosseB_AGI/176.10.164.48:52950 peer info: IV_PLAT=linux
Sun Dec 15 00:17:00 2019 us=570346 BosseB_AGI/176.10.164.48:52950 peer info: IV_PROTO=2
Sun Dec 15 00:17:00 2019 us=570372 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4=1
Sun Dec 15 00:17:00 2019 us=570398 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4v2=1
Sun Dec 15 00:17:00 2019 us=570424 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZO=1
Sun Dec 15 00:17:00 2019 us=570450 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUB=1
Sun Dec 15 00:17:00 2019 us=570476 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUBv2=1
Sun Dec 15 00:17:00 2019 us=570502 BosseB_AGI/176.10.164.48:52950 peer info: IV_TCPNL=1
Sun Dec 15 00:17:00 2019 us=570730 BosseB_AGI/176.10.164.48:52950 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 00:17:00 2019 us=570774 BosseB_AGI/176.10.164.48:52950 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 00:17:00 2019 us=714642 BosseB_AGI/176.10.164.48:52950 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sun Dec 15 01:17:00 2019 us=481690 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=1, --- identification removed --- CN=rpi3-agivpn, name=rpi3-agivpn, --- identification removed ---
Sun Dec 15 01:17:00 2019 us=482313 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=0, --- identification removed --- CN=BosseB_AGI, name=BosseB_AGI, --- identification removed ---
Sun Dec 15 01:17:00 2019 us=627048 BosseB_AGI/176.10.164.48:52950 peer info: IV_VER=2.4.7
Sun Dec 15 01:17:00 2019 us=627161 BosseB_AGI/176.10.164.48:52950 peer info: IV_PLAT=linux
Sun Dec 15 01:17:00 2019 us=627196 BosseB_AGI/176.10.164.48:52950 peer info: IV_PROTO=2
Sun Dec 15 01:17:00 2019 us=627227 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4=1
Sun Dec 15 01:17:00 2019 us=627258 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4v2=1
Sun Dec 15 01:17:00 2019 us=627288 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZO=1
Sun Dec 15 01:17:00 2019 us=627319 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUB=1
Sun Dec 15 01:17:00 2019 us=627349 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUBv2=1
Sun Dec 15 01:17:00 2019 us=627379 BosseB_AGI/176.10.164.48:52950 peer info: IV_TCPNL=1
Sun Dec 15 01:17:00 2019 us=627634 BosseB_AGI/176.10.164.48:52950 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 01:17:00 2019 us=627691 BosseB_AGI/176.10.164.48:52950 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 01:17:00 2019 us=771660 BosseB_AGI/176.10.164.48:52950 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sun Dec 15 02:17:00 2019 us=291205 BosseB_AGI/176.10.164.48:52950 TLS: soft reset sec=0 bytes=27410/-1 pkts=702/0
Sun Dec 15 02:17:00 2019 us=774764 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=1, --- identification removed --- CN=rpi3-agivpn, name=rpi3-agivpn, --- identification removed ---
Sun Dec 15 02:17:00 2019 us=775229 BosseB_AGI/176.10.164.48:52950 VERIFY OK: depth=0, --- identification removed --- CN=BosseB_AGI, name=BosseB_AGI, --- identification removed ---
Sun Dec 15 02:17:00 2019 us=919795 BosseB_AGI/176.10.164.48:52950 peer info: IV_VER=2.4.7
Sun Dec 15 02:17:00 2019 us=919900 BosseB_AGI/176.10.164.48:52950 peer info: IV_PLAT=linux
Sun Dec 15 02:17:00 2019 us=919932 BosseB_AGI/176.10.164.48:52950 peer info: IV_PROTO=2
Sun Dec 15 02:17:00 2019 us=919960 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4=1
Sun Dec 15 02:17:00 2019 us=919987 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZ4v2=1
Sun Dec 15 02:17:00 2019 us=920013 BosseB_AGI/176.10.164.48:52950 peer info: IV_LZO=1
Sun Dec 15 02:17:00 2019 us=920040 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUB=1
Sun Dec 15 02:17:00 2019 us=920067 BosseB_AGI/176.10.164.48:52950 peer info: IV_COMP_STUBv2=1
Sun Dec 15 02:17:00 2019 us=920094 BosseB_AGI/176.10.164.48:52950 peer info: IV_TCPNL=1
Sun Dec 15 02:17:00 2019 us=920325 BosseB_AGI/176.10.164.48:52950 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 02:17:00 2019 us=920370 BosseB_AGI/176.10.164.48:52950 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Dec 15 02:17:01 2019 us=64476 BosseB_AGI/176.10.164.48:52950 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sun Dec 15 03:17:00 2019 us=721402 BosseB_AGI/176.10.164.48:52950 TLS: tls_process: killed expiring key
So every hour there is some action even though nothing has been sent from the client...
The information in this log showed me that a connection using the same ovpn file has been running since many days from a raspberry pi computer I am developing code on. I have no idea that this was going on because the VPN connection from the RPi should only be active during subversion interactions with the company SVN server.
Questions:
1) How can I allow multiple connections to the server using the same ovpn file without them disturbing each other?
2) How am I supposed to close an OVPN connection on Linux?
There is no OpenVPN-GUI application available on Linux so the only way I have found to actually close the connection is by the following:
ps aux | grep openvpn
sudo kill <process number from the ps call>
But this probably does not cleanly close the connection, right?
So on Linux how does one close a connection cleanly?
3) Do I need a separate ovpn file for Raspberry Pi usage?