A client is connected to an OpenVPN network. I'm on the OpenVPN server and have access to the client's public key/cert file (e.g. client5.crt).
(How) can I find out what IP is assigned to the client in the OpenVPN network based on that?
A client is connected to an OpenVPN network. I'm on the OpenVPN server and have access to the client's public key/cert file (e.g. client5.crt).
(How) can I find out what IP is assigned to the client in the OpenVPN network based on that?
Then, one can enable "management console" in the OpenVPN server (line management /var/run/openvpn.mgmt unix in openvpn config), and query it to match "Common Name" with an IP:
$ echo 'status 2' | socat stdio /var/run/openvpn.mgmt | grep '^ROUTING_TABLE' | cut -d, -f2-3
10.91.0.1,foobar
10.91.0.6,other-name
...
Something based on this may work, as long as every client has a unique "Common Name".