Debian – Check openVPN client connected Debian

debianopenvpn

How can I check if my Debian OpenVPN client is connected? Is there a specific command I have to run? Or can I read it from the logfile?

Thanks.

Edit:
The answers below provide great value in debugging. I used the same open vpn credentials on two different systems, causing issues.

Best Answer

It isn't clear to me if you are asking from the perspective of a client or server. In any case one thing you should strongly look at is enabling the management interface on your OpenVPN daemon with this configuration option.

management 127.0.0.1 6001

With the management interface enabled you can connected to whatever port you setup for this purpose using netcat/telnet. Then you can issue the status command, or many other commands to determine exactly what is going on from the daemons perspective.