I'm trying to get OpenVPN up and running on server / client but am stumbling to identify the problem. I have openvpn installed (on a pfsense box) and client configuration good to go as well. When I'm at home on the LAN, it connects and works fine. When I'm external, I don't even think OpenVPN is seeing the connections or something.
The config is set up to run on UDP 1194. I stopped the openvpn service and just did a simple test with netcat to verify that UDP/1194 does indeed get through, and it does (both ways). So I don't think it's a Firewall issue. I also have Snort running, but I do not see any alerts when the connection is failing, so I don't think that should be the issue either. I have also tried disabling Snort and still have same issue. On the client machine, these are logs that I see.
2012-09-24 10:58:40 LZO compression initialized
2012-09-24 10:58:41 UDPv4 link local (bound): [undef]:1194
2012-09-24 10:58:41 UDPv4 link remote: SERVERIP:1194
2012-09-24 10:59:41 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
2012-09-24 10:59:41 TLS Error: TLS handshake failed
2012-09-24 10:59:41 SIGUSR1[soft,tls-error] received, process restarting
2012-09-24 10:59:41 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
2012-09-24 10:59:41 WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
2012-09-24 10:59:41 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2012-09-24 10:59:41 Re-using SSL/TLS context
2012-09-24 10:59:41 LZO compression initialized
2012-09-24 10:59:41 UDPv4 link local (bound): [undef]:1194
2012-09-24 10:59:41 UDPv4 link remote: SERVERIP:1194
On the other end, I never see much of anything, even with using verb 5 (and even verb 15 didn't show anything...I'm not sure exactly what it should show, but I would think it'd show the initial incoming packet at least at SOME level).
It's really just a bunch of the following (currently verb 5 I think)
Sun Sep 23 19:10:32 2012 MANAGEMENT: Client disconnected
Sun Sep 23 19:11:34 2012 MANAGEMENT: Client connected from /var/etc/openvpn/server1.sock
Sun Sep 23 19:11:34 2012 MANAGEMENT: CMD 'status 2'
Sun Sep 23 19:11:34 2012 MANAGEMENT: CMD 'quit'
Sun Sep 23 19:11:34 2012 MANAGEMENT: Client disconnected
Sun Sep 23 19:12:36 2012 MANAGEMENT: Client connected from /var/etc/openvpn/server1.sock
Sun Sep 23 19:12:36 2012 MANAGEMENT: CMD 'status 2'
Sun Sep 23 19:12:36 2012 MANAGEMENT: CMD 'quit'
Sun Sep 23 19:12:36 2012 MANAGEMENT: Client disconnected
Sun Sep 23 19:13:38 2012 MANAGEMENT: Client connected from /var/etc/openvpn/server1.sock
Sun Sep 23 19:13:38 2012 MANAGEMENT: CMD 'status 2'
Sun Sep 23 19:13:38 2012 MANAGEMENT: CMD 'quit'
Sun Sep 23 19:13:38 2012 MANAGEMENT: Client disconnected
Sun Sep 23 19:14:40 2012 MANAGEMENT: Client connected from /var/etc/openvpn/server1.sock
Sun Sep 23 19:14:40 2012 MANAGEMENT: CMD 'status 2'
If I run 'tcpdump -i em0 udp and 1194' where em0 is the external port I see the incoming packets from client connection attempts, but nothing outgoing.
Anyone have any suggestions on next step?
Server conf below:
dev ovpns1
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_server1.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher BF-CBC
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local EXTERNALIP
tls-server
server 192.168.8.0 255.255.255.0
client-config-dir /var/etc/openvpn-csc
username-as-common-name
auth-user-pass-verify /var/etc/openvpn/server1.php via-env
tls-verify /var/etc/openvpn/server1.tls-verify.php
lport 1194
management /var/etc/openvpn/server1.sock unix
max-clients 2
push "route 192.168.7.0 255.255.255.0"
ca /var/etc/openvpn/server1.ca
cert /var/etc/openvpn/server1.cert
key /var/etc/openvpn/server1.key
dh /etc/dh-parameters.1024
tls-auth /var/etc/openvpn/server1.tls-auth 0
comp-lzo
persist-remote-ip
float
# logging
#status /var/log/openvpn-status.log
#log /var/log/openvpn.log
#log-append /var/log/openvpn.log
verb 5
Client Conf:
dev tun
persist-tun
persist-key
proto udp
cipher BF-CBC
tls-client
client
resolv-retry infinite
remote SERVERIP 1194
tls-remote Server Cert
auth-user-pass
pkcs12 zeus-udp-1194.p12
tls-auth zeus-udp-1194-tls.key 1
comp-lzo