4

I need to know, how can I identify an OpenVPN clients, connecting to an OpenVPN gateway with a username, for example? Where would I put it in the connection profile file? Or generate a personal certificate with a name for it?

Another question - when I have two OpenVPN clients connected, user1 and user2, how do I list them and their assigned IP's from OpenVPN server machine? Commands in OpenVPN telnet management interface don't seem to provide this.

Maxim V. Pavlov
  • 653
  • 2
  • 11
  • 29
  • Is [this][1] topic related to your question? [1]: http://serverfault.com/questions/571592/how-to-view-connected-users-to-open-vpn-server – Adam Jul 30 '15 at 19:53
  • @Adam, it's not. Nothing that is advised in the referenced question can answer this one. – Maxim V. Pavlov Jul 30 '15 at 20:41

1 Answers1

4

Generally, your situation seems to predicate CCD, "client config dir". CCD is a directory containing one file per connection profile. The file is tied to a unique client key, so that the key "johndoe" gets the profile specified in ccd/johndoe assigned when connecting. With this approach, you know which IP a specific client has. However, if you just want to list connected clients together with IPs, you can specify "status openvpn-status.log" in your config file. Then openvpn-status.log will contain an updated list of connected clients.

Joel Palmius
  • 201
  • 1
  • 5
  • At least on Windows, `status openvpn-status.log` puts the log in the config directory. Use `status status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"` (yes with doubled backslashes) to target the log directory. – Mark Berry Apr 02 '19 at 21:44