cad / ovpm

OpenVPN Management Server - Effortless and free OpenVPN server administration tool
GNU Affero General Public License v3.0
365 stars 76 forks source link

How to get the ip of a specific user ? #95

Closed mehrdad-tat closed 4 years ago

mehrdad-tat commented 4 years ago

Is there any way to get the IP address of a specific user ?

Same as command "ovpm net list", but only for one user and only for IP Address value

cad commented 4 years ago

In order to get VPN IP of a specific user you can use the following.

# replace <username> with the  actual username of which you want to find out its IP address
$ ovpm u l | grep <username> | tr -d ' ' | cut -d'|' -f 4 | cut -d '/' -f 1