Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have posted this same thing at stackOverflow and someone pointed me at the fact that this should be here instead...

I'm looking for possible solutions to the following need:

I have a VPN configured (using openVPN over Linux, BTW), and I want to know at any moment which hosts are connected to it. I recognize that it probably is the same thing as trying to know which hosts are connected to a lan, so any of the solutions might do the job...

The fact is that I once used a hamachi vpn on linux and with it I had the chance to know which hosts were connected to a particular network where I belonged, so I was wondering if something similar might be possible in openVPN (or even any VPN and/or any LAN).

Preferably, I'm looking for opensource/free sw solutions, or maybe the hints to program it myself (in the most simple way if possible, not that I don't know how to program, but I'm trying to achieve this in a simple manner). But anyway, if there are no os/fsw solutions, any other one might do...

Thanks a lot!

Javier, Mexico city

ok! thanks for you reply

I'm trying to deploy the management interface, but I'm facing some trouble I don't know how to handle.

I added the following line to my server conf file:

management 2308 /etc/openvpn/password

I am sure port 2308 is unused, and happens to be the address openVPN gives to my server (am I right with this? perhaps I understood this upside down :( ) and I echoed a password of my choice into the password file.

After restarting openvpn I get this:

MANAGEMENT: Cannot bind TCP socket on Cannot assign requested address (errno=99)

any ideas?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

OpenVPN comes with a management interface that can provide some useful information. Please see http://openvpn.net/index.php/open-source/documentation/miscellaneous/79-management-interface.html
It requires some changes to your OpenVPN configuration file: You can activate the management interface by adding these lines

management 5555 /etc/openvpn/password

Change the address by the OpenVPN default address and 5555 by any unused port, setup a file (e.g /etc/openvpn/password) that will contain the management interface password. Later do a telnet to target like this:

telnet 5555

Furthermore, you can also manage who is connected to your OpenVPN server using a python script, please take a look at ovpnview

share|improve this answer

In your OpenVPN server.conf file, include the directive: "status /var/log/openvpn-status.log" if it's not there already. (Restart OpenVPN if you do have to make this change.)

...Then, to see what hosts are connected remotely:

$ cat /var/log/openvpn-status.log

You'll get something like this:

----- 8< -----

Updated,Mon Aug 17 12:20:18 2009
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
siteX,x.x.x.x:16597,14377206,74214704,Mon Aug 10 13:36:21 2009
siteY,y.y.y.y:6983,42178125,396122560,Thu Aug  6 00:30:17 2009
Virtual Address,Common Name,Real Address,Last Ref,siteX,x.x.x.x:16597,Mon Aug 17 12:19:18 2009,siteY,y.y.y.y:6983,Mon Aug 17 12:19:18 2009
Max bcast/mcast queue length,0

----- 8< -----

Hope this helps :)

share|improve this answer
thanks too, didn't knew all this, I can use it in case of emergencies also... –  Javier Novoa C. Aug 17 '09 at 22:54

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.