Some more info about my problem. So I restarted the server and then I connected to the OpenVPN server from a client. Here is what I get in the server's log:
TLS: Initial packet from [AF_INET]x.x.x.x:27427, sid=434eaddb 02ae0126
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 VERIFY OK: depth=1, C=US, O=ME, OU=IT, CN=vpn, name=server, emailAddress=info@me.com
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 VERIFY OK: depth=0, C=US, O=ME, OU=IT, CN=client1, name=server, emailAddress=info@me.com
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 peer info: IV_VER=2.3.4
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 peer info: IV_PLAT=linux
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 2048 bit RSA
Tue Jul 31 14:32:56 2018 x.x.x.x:27427 [client1] Peer Connection Initiated with [AF_INET]x.x.x.x:27427
Tue Jul 31 14:32:56 2018 client1/x.x.x.x:27427 MULTI_sva: pool returned IPv4=10.10.50.6, IPv6=(Not enabled)
Tue Jul 31 14:32:56 2018 client1/x.x.x.x:27427 MULTI: Learn: 10.10.50.6 -> client1/x.x.x.x:27427
Tue Jul 31 14:32:56 2018 client1/x.x.x.x:27427 MULTI: primary virtual IP for client1/x.x.x.x:27427: 10.10.50.6
Tue Jul 31 14:32:58 2018 client1/x.x.x.x:27427 PUSH: Received control message: 'PUSH_REQUEST'
Tue Jul 31 14:32:58 2018 client1/x.x.x.x:27427 SENT CONTROL [client1]: 'PUSH_REPLY,route 192.168.0.0 255.255.255.0,dhcp-option DNS 192.168.0.1,route 10.10.50.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.10.50.6 10.10.50.5' (status=1)
One the client side, if I close the connection and restart it again, the server tells me that the user "client1" is already connected. Here is the log:
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 TLS: Initial packet from [AF_INET]x.x.x.x:54643, sid=08fa1028 926c9fab
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 VERIFY OK: depth=1, C=US, O=ME, OU=IT, CN=vpn, name=server, emailAddress=info@me.com
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 VERIFY OK: depth=0, C=US, O=ME, OU=IT, CN=client1, name=server, emailAddress=info@me.com
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 peer info: IV_VER=2.3.4
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 peer info: IV_PLAT=linux
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 2048 bit RSA
Tue Jul 31 14:56:04 2018 x.x.x.x:54643 [client1] Peer Connection Initiated with [AF_INET]x.x.x.x:54643
Tue Jul 31 14:56:04 2018 MULTI: new connection by client 'client1' will cause previous active sessions by this client to be dropped. Remember to use the --duplicate-cn option if you want multiple clients using the same certificate or username to concurrently connect.
Tue Jul 31 14:56:04 2018 MULTI_sva: pool returned IPv4=10.10.50.6, IPv6=(Not enabled)
Tue Jul 31 14:56:04 2018 MULTI: Learn: 10.10.50.6 -> client1/x.x.x.x:54643
Tue Jul 31 14:56:04 2018 MULTI: primary virtual IP for client1/x.x.x.x:54643: 10.10.50.6
Tue Jul 31 14:56:06 2018 client1/x.x.x.x:54643 PUSH: Received control message: 'PUSH_REQUEST'
Tue Jul 31 14:56:06 2018 client1/x.x.x.x:54643 SENT CONTROL [client1]: 'PUSH_REPLY,route 192.168.0.0 255.255.255.0,dhcp-option DNS 192.168.0.1,route 10.10.50.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.10.50.6 10.10.50.5' (status=1)
It's like the server can't detect that the user is disconnected. When I restart the server, I don't get that the user is registered. Why is that?
Another question about the following log entries:
MULTI_sva: pool returned IPv4=10.10.50.6, IPv6=(Not enabled)
MULTI: Learn: 10.10.50.6 -> client1/x.x.x.x:27427
MULTI: primary virtual IP for client1/x.x.x.x:27427: 10.10.50.6
Am I assuming correctly that the "MULTI" entries in the logs indicate that more than one user use the same certificates? Or we normally get these entries?