Hi,
I have kind of a weird problem with OpenVPN that I am hoping somebody can help me diagnose. My configuration is pretty simple and the symptom is obvious, however I am unable to reliably reproduce the problem.
I am using the standard OpenVPN package on Ubuntu 10.04.2 LTS with a bridging/tap interface (br0). I am also using "plugin /usr/lib/openvpn/openvpn-auth-pam.so login" to have OpenVPN authenticate against the local /etc/shadow file (in conjunction with RSA certificates for authentication). I am using easy-rsa as my CA. I'm basically doing the setup that is specified in this document:
https://help.ubuntu.com/community/OpenVPN (with the auth-pam.so module added). My OpenVPN package version is 2.1.0-1ubuntu1.1 as reported by "dpkg -s openvpn".
I've actually got everything working fine. Users can authenticate using their credentials in combination with their RSA certificate fine from both Window XP and OS X workstations. They can use the VPN and talk unrestricted to the host through the tunnel without issue. The problem is that after running for a day or two, and for no explainable reason, OpenVPN authentication just "hangs". The server is still listening on the port, but users are unable to authenticate. To fix the problem, all I have to do is restart the OpenVPN service and the problem is fixed. Since I am using easy-rsa and local authentication, I am confused as to what could possibly be breaking in the authentication phase. What I'm seeing in the client side logs is this:
Wed Jun 22 14:34:12 2011 Expected Remote Options hash (VER=V4): '360696c5'
Wed Jun 22 14:34:12 2011 UDPv4 link local: [undef]
Wed Jun 22 14:34:12 2011 UDPv4 link remote: 68.169.149.182:13370
Wed Jun 22 14:34:12 2011 TLS: Initial packet from 68.169.149.182:13370, sid=515b6a80 84a52bbd
Wed Jun 22 14:34:13 2011 VERIFY OK: depth=1, /C=US/ST=TN/L=Chattanooga/O=New_Age_Communications/CN=New_Age_Communications_CA/emailAddress=
jctut1@gmail.com
Wed Jun 22 14:34:13 2011 VERIFY OK: depth=0, /C=US/ST=TN/L=Chattanooga/O=New_Age_Communications/CN=server/emailAddress=
jctut1@gmail.com
Wed Jun 22 14:34:13 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 22 14:34:13 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 22 14:34:13 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Jun 22 14:34:13 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Jun 22 14:34:13 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed Jun 22 14:34:13 2011 [server] Peer Connection Initiated with 68.169.149.182:13370
Wed Jun 22 14:34:15 2011 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Jun 22 14:34:16 2011 AUTH: Received AUTH_FAILED control message
Wed Jun 22 14:34:16 2011 TCP/UDP: Closing socket
Wed Jun 22 14:34:16 2011 SIGTERM[soft,auth-failure] received, process exiting
Wed Jun 22 14:34:16 2011 OpenVPN 2.2.0 Win32-MSVC++ [SSL] [LZO2] built on Apr 26 2011
Now, I am 100% sure that the password being specified when this occurs is valid. And from what I can tell from the debug logs the certificate is valid as well. Basically I am seeing "SIGTERM[soft,auth-failure] received, process exiting", although I am certain that the password being specified is valid. And as I said earlier, the *only* thing I have to do to fix this problem is restart the OpenVPN service. This is a reliable fix.
I enabled logging on the server side with "log /var/log/openvpn.log", and I don't see anything blaring in the logs that even suggest an authentication failure is actually taking place. So I guess I have two questions;
1) Giving that restarting the OpenVPN service is the only thing required to make the problem go away, can anybody provide insight as to what may be causing this issue?
2) Is there a way to turn up the verbosity on the server side logging to get more visibility into how the daemon is operating?