How to list the client???

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ducarpit
OpenVPN User
Posts: 13
Joined: Tue Jun 06, 2017 10:39 am

How to list the client???

Post by ducarpit » Fri Jun 09, 2017 6:54 am

Hi,
i have to view (list) the actual client that are connected to the VPN but i don't know why.
In my server configuration i have this:

Code: Select all

status /var/log/openvpn-status.log 20
But in my openvpn-status.log i havo only this:
openvpn-status.log
TITLE OpenVPN 2.3.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan 23 2016
TIME Fri Jun 9 08:53:20 2017 1496991200
HEADER CLIENT_LIST Common Name Real Address Virtual Address Bytes Received Bytes Sent Connected Since Connected Since (time_t) Username
HEADER ROUTING_TABLE Virtual Address Common Name Real Address Last Ref Last Ref (time_t)
GLOBAL_STATS Max bcast/mcast queue length 1
END
Can someone help me?
Thank
Christian

ducarpit
OpenVPN User
Posts: 13
Joined: Tue Jun 06, 2017 10:39 am

Re: How to list the client???

Post by ducarpit » Fri Jun 09, 2017 7:04 am

Hi,
i dicovered that in my server configuration file i have also this:

Code: Select all

[quote]log /var/log/openvpn.log[/quote]
And i can list the user with:

Code: Select all

sudo cat /var/log/openvpn.log | grep "Peer Connection"
I have an output like this:
result
Wed Jun 7 14:16:18 2017 89.31.48.28:62411 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:62411
Wed Jun 7 14:28:48 2017 89.31.48.28:60223 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:60223
Wed Jun 7 18:34:37 2017 5.170.79.69:19805 [toshiba] Peer Connection Initiated with [AF_INET]5.170.79.69:19805
Thu Jun 8 08:41:22 2017 89.31.48.28:58245 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:58245
Thu Jun 8 13:45:41 2017 89.31.48.28:65083 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:65083
Thu Jun 8 14:01:04 2017 89.31.48.28:50479 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:50479
Thu Jun 8 15:36:01 2017 89.31.48.28:58614 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:58614
Thu Jun 8 15:37:47 2017 89.31.48.28:55122 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:55122
Thu Jun 8 15:42:42 2017 89.31.48.28:51005 [ufficio] Peer Connection Initiated with [AF_INET]89.31.48.28:51005
It's not the best solution......
Do you know a better one?
Christian

Post Reply