I have installed pptpd in my linode vps, and setup a few client accounts. The problem is how could I view current connected pptpd clients in commandline?
Asked
Active
Viewed 2.4k times
2 Answers
7
You can use the command last |grep ppp
The above command uses last
to display all logins of users. As all PPTP VPN are connected through ppp0 / ppp1 / pp2 / ... , you can get VPN user access history.
Sample result:
root@www:~# last |grep ppp
user1 ppp0 <client-IP-address> Mon Jul 7 23:45 still logged in
user2 ppp0 <client-IP-address> Mon Jul 7 22:59 - 23:08 (00:09)
user3 ppp1 <client-IP-address> Mon Jul 7 22:58 - 23:01 (00:03)

Ladadadada
- 26,337
- 7
- 59
- 90

StevenHui
- 71
- 1
- 3
3
ifconfig
should return the ppp[X] interface when you have a connected user. Use that with who
and last
(grep with 'ppp' to find out users who are connected via VPN) , and it should provide plenty of information to cross reference.

NickW
- 10,263
- 1
- 20
- 27