Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup a CentOS 5 OpenVPN server using this howto.

The test client is another CentOS 5, where I have copied ca.crt, client1.crt, client1.key and client.conf to.

I don't see any errors when doing

openvpn --config client.conf

on the client, and I don't see any error messages in the server logs.

ifconfig on the client only shows me eth0 and lo and default gateway in route haven't been changed to the openvpn's IP address.


How do I know if a VPN connection have been established and working?

What command output should I expect?


When I look at this howto, he configure iptable. Should I also do that?


The problem might have been that my test client was a VMware VM. When I try with a bare metal client, I get the tun0 device.

Why I can't have an OpenVPN connection in a VMware VM is beyond me, but it seams to be the problem I guess.

share|improve this question
try turning up the logging level in the server and client configs. – Sirex Aug 31 '11 at 13:28
Please post your server and client configuration files? And as @Sirex suggested, increate verb to 9 and give us the output on client? – quanta Aug 31 '11 at 14:01
@quanta : it seamed to have been a VMware problem. Apparently openVPN client doesn't work in a VMware VM. When I use the same client files on bare metal, I get a tun0 device... – Sandra Aug 31 '11 at 14:07
@Sirex : Using a bare metal client seamed to solve the problme instead of using a VMware VM for client... – Sandra Aug 31 '11 at 14:08
up vote 1 down vote accepted

ifconfig on the client only shows me eth0 and lo and default gateway in route haven't been changed to the openvpn's IP address.

It means that your VPN connection is not working. Please give us the output on client and logs on the server.

share|improve this answer
ok. I have now updated the post with the client and server logs. – Sandra Aug 31 '11 at 13:38
Done an update. Might have been a VMware problem... – Sandra Aug 31 '11 at 14:04

OpenVPN generally uses UDP, which is stateless. This means, that unless you have a keepalive option configured, it can have a tun interface up forever, even if there is no connection at all.

To be able to see if the connection is up, enable keepalive and do a ping test every now and then. Put in you servers config:

keepalive 10 120

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.