Can I get a list of connected clients on openvpn (like "hamachi list"?)

2

1

I'm getting openvpn going between a server and a few clients. I've got them connecting, but I'm not sure how I'm supposed to find out what the remote IP's are. Back when I used Hamachi, I could just say:

hamachi list

but now, the only thing I can think of using is nmap to ping all of the IP range of my clients. But, even then, I'd have to connect to each of my clients in order to find out which is which.

Is there something like "hamachi list" for OpenVPN?

Jemenake

Posted 2014-03-10T18:59:39.350

Reputation: 231

Answers

3

Enable the management interface using --management:

management /var/run/openvpn.mgmt unix

Connect to the socket, and use the status or status 3 command:

# echo "status 3" | socat stdio /var/run/openvpn.mgmt

user1686

Posted 2014-03-10T18:59:39.350

Reputation: 283 655

This is a nice approach, particularly because you're not forced to wait for the status file to update (like other approaches). I knew this was possible with the management interface, but was looking for a quick pointer on how to extract it. Thanks! – BSchlinker – 2016-02-01T20:33:12.163