How to view connected users to open vpn server? The Next CEO of Stack OverflowHow to identify...
How do I fit a non linear curve?
Towers in the ocean; How deep can they be built?
Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?
What day is it again?
What connection does MS Office have to Netscape Navigator?
Can someone explain this formula for calculating Manhattan distance?
Why is information "lost" when it got into a black hole?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
TikZ: How to fill area with a special pattern?
Aggressive Under-Indexing and no data for missing index
Is there a reasonable and studied concept of reduction between regular languages?
Decide between Polyglossia and Babel for LuaLaTeX in 2019
Audio Conversion With ADS1243
Is fine stranded wire ok for main supply line?
Does Germany produce more waste than the US?
Won the lottery - how do I keep the money?
Where do students learn to solve polynomial equations these days?
(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?
How to use ReplaceAll on an expression that contains a rule
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Can I calculate next year's exemptions based on this year's refund/amount owed?
Could a dragon use its wings to swim?
Scary film where a woman has vaginal teeth
Spaces in which all closed sets are regular closed
How to view connected users to open vpn server?
The Next CEO of Stack OverflowHow to identify and list openvpn connected clientsFree or very Cheap VPN server software with high concurrent users countCleaning Up Unused Users and Groups (Ubuntu 10.10 Server)How to set up OpenVPN to let the VPN clients to access all the servers inside the server LAN?One host unavailable over (Open)VPNEnable SSH only when connected to VPN (OpenVPN)Setting up mail delivery to Django on UbuntuHow do I assign specific IP address to my OpenVPN server?uWSGI backtrace: semgentation fault errorsOpen VPN and Virtual machinesKerberos Double Hop Delegation from IIS to SQL server (using django)
I'm developing a website for managing OpenVPN users with Django framework. But I need to know is there any way to extract active users from OpenVPN? My server is running Ubuntu 12.04.
openvpn
add a comment |
I'm developing a website for managing OpenVPN users with Django framework. But I need to know is there any way to extract active users from OpenVPN? My server is running Ubuntu 12.04.
openvpn
add a comment |
I'm developing a website for managing OpenVPN users with Django framework. But I need to know is there any way to extract active users from OpenVPN? My server is running Ubuntu 12.04.
openvpn
I'm developing a website for managing OpenVPN users with Django framework. But I need to know is there any way to extract active users from OpenVPN? My server is running Ubuntu 12.04.
openvpn
openvpn
edited 5 mins ago
kikio
1217
1217
asked Feb 2 '14 at 0:30
Hamid FzMHamid FzM
3901614
3901614
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
There should be a status log you can look at to show you, mine is, for examle:
cat /etc/openvpn/openvpn-status.log
EDIT:
As an alternative, adding the flag --management IP port [pw-file]
or adding that same directive to your server.conf
, for example:
management localhost 7505
This would allow you to telnet to that port and offer you a list of commands to run:
telnet localhost 7505
help
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead/var/run/openvpn/server.status
did worked perfectly.
– Nelson
Oct 1 '17 at 8:20
add a comment |
To complete @sekrett answer :
killall -USR2 openvpn ; tail -f /var/log/syslog
It will keep running, it's not a "regular" kill, just a request to print some stats.
Displayed statistics are very readable.
Sample output :
Oct 14 07:34:14 vpn2 openvpn[20959]: Updated,Fri Oct 14 07:34:14 2016
Oct 14 07:34:14 vpn2 openvpn[20959]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.132,hostname1,213.219.XXX.XXX:63765,Fri Oct 14 07:25:01 2016
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.242,hostname2,213.219.XXX.XXX:62416,Sun Sep 25 03:49:19 2016
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
add a comment |
I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file)
.
To get the exact number of client you can do :
- telnet localhost 6666
- status
Then you'll get lot of logs :
10.9.10.11,test-docker,52.58.48.98:56859,Wed May 4 09:37:34 2016
10.9.7.45,test-docker,52.58.156.80:38774,Wed May 4 09:36:59 2016
10.9.1.103,test-docker,52.58.161.230:52201,Wed May 4 09:35:47 2016
GLOBAL STATS
Max bcast/mcast queue length,0
END
>CLIENT:ESTABLISHED,19845
>CLIENT:ENV,n_clients=19361
>CLIENT:ENV,time_unix=1462357164
- look for => >CLIENT:ENV,n_clients=19361
In my case since I have a very large number of client, using the log file is definitely not very practical.
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
add a comment |
You can also send usr2 signal to openvpn process to make it write statistic information to syslog. This is safe, you don't need to reboot in case you did not enable management interface before.
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:killall -USR2 openvpn
. Then watch the logs. It might be/var/log/syslog
or/var/log/messages
depending on distro.
– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by runningkill -l
.
– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
|
show 1 more comment
Just use sacli with the following command. This will list the connected VPN clients.
/usr/local/openvpn_as/scripts/sacli VPNSummary
{
"n_clients": 15
}
To see all the IPs use this option.
./sacli VPNStatus
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f571592%2fhow-to-view-connected-users-to-open-vpn-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
There should be a status log you can look at to show you, mine is, for examle:
cat /etc/openvpn/openvpn-status.log
EDIT:
As an alternative, adding the flag --management IP port [pw-file]
or adding that same directive to your server.conf
, for example:
management localhost 7505
This would allow you to telnet to that port and offer you a list of commands to run:
telnet localhost 7505
help
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead/var/run/openvpn/server.status
did worked perfectly.
– Nelson
Oct 1 '17 at 8:20
add a comment |
There should be a status log you can look at to show you, mine is, for examle:
cat /etc/openvpn/openvpn-status.log
EDIT:
As an alternative, adding the flag --management IP port [pw-file]
or adding that same directive to your server.conf
, for example:
management localhost 7505
This would allow you to telnet to that port and offer you a list of commands to run:
telnet localhost 7505
help
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead/var/run/openvpn/server.status
did worked perfectly.
– Nelson
Oct 1 '17 at 8:20
add a comment |
There should be a status log you can look at to show you, mine is, for examle:
cat /etc/openvpn/openvpn-status.log
EDIT:
As an alternative, adding the flag --management IP port [pw-file]
or adding that same directive to your server.conf
, for example:
management localhost 7505
This would allow you to telnet to that port and offer you a list of commands to run:
telnet localhost 7505
help
There should be a status log you can look at to show you, mine is, for examle:
cat /etc/openvpn/openvpn-status.log
EDIT:
As an alternative, adding the flag --management IP port [pw-file]
or adding that same directive to your server.conf
, for example:
management localhost 7505
This would allow you to telnet to that port and offer you a list of commands to run:
telnet localhost 7505
help
edited Mar 28 '16 at 12:17
wazoox
4,88142249
4,88142249
answered Feb 2 '14 at 3:05
c4urselfc4urself
3,14521631
3,14521631
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead/var/run/openvpn/server.status
did worked perfectly.
– Nelson
Oct 1 '17 at 8:20
add a comment |
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead/var/run/openvpn/server.status
did worked perfectly.
– Nelson
Oct 1 '17 at 8:20
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
Thanks but is there any other way not to watch for file changes? For example a library that lists connected users?
– Hamid FzM
Feb 2 '14 at 15:18
1
1
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@HamidFzM not sure about a library, you can use the management interface I added as an edit; please don't use an IP other than localhost as it would surely be a detriment to your security
– c4urself
Feb 2 '14 at 17:05
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@c4urself, my output for the .log is: bit.ly/1ORnsYp Where can I see the connected users? Is it possible to see the ips assigned to them via this .log?
– Maxim V. Pavlov
Jul 30 '15 at 19:21
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
@MaximV.Pavlov looks like no one is connected in your case. Yes, IP addresses are shown.
– c4urself
Aug 12 '15 at 8:09
1
1
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead /var/run/openvpn/server.status
did worked perfectly.– Nelson
Oct 1 '17 at 8:20
/etc/openvpn/openvpn-status.log
didn't work for me on Debian, it never changed, instead /var/run/openvpn/server.status
did worked perfectly.– Nelson
Oct 1 '17 at 8:20
add a comment |
To complete @sekrett answer :
killall -USR2 openvpn ; tail -f /var/log/syslog
It will keep running, it's not a "regular" kill, just a request to print some stats.
Displayed statistics are very readable.
Sample output :
Oct 14 07:34:14 vpn2 openvpn[20959]: Updated,Fri Oct 14 07:34:14 2016
Oct 14 07:34:14 vpn2 openvpn[20959]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.132,hostname1,213.219.XXX.XXX:63765,Fri Oct 14 07:25:01 2016
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.242,hostname2,213.219.XXX.XXX:62416,Sun Sep 25 03:49:19 2016
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
add a comment |
To complete @sekrett answer :
killall -USR2 openvpn ; tail -f /var/log/syslog
It will keep running, it's not a "regular" kill, just a request to print some stats.
Displayed statistics are very readable.
Sample output :
Oct 14 07:34:14 vpn2 openvpn[20959]: Updated,Fri Oct 14 07:34:14 2016
Oct 14 07:34:14 vpn2 openvpn[20959]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.132,hostname1,213.219.XXX.XXX:63765,Fri Oct 14 07:25:01 2016
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.242,hostname2,213.219.XXX.XXX:62416,Sun Sep 25 03:49:19 2016
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
add a comment |
To complete @sekrett answer :
killall -USR2 openvpn ; tail -f /var/log/syslog
It will keep running, it's not a "regular" kill, just a request to print some stats.
Displayed statistics are very readable.
Sample output :
Oct 14 07:34:14 vpn2 openvpn[20959]: Updated,Fri Oct 14 07:34:14 2016
Oct 14 07:34:14 vpn2 openvpn[20959]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.132,hostname1,213.219.XXX.XXX:63765,Fri Oct 14 07:25:01 2016
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.242,hostname2,213.219.XXX.XXX:62416,Sun Sep 25 03:49:19 2016
To complete @sekrett answer :
killall -USR2 openvpn ; tail -f /var/log/syslog
It will keep running, it's not a "regular" kill, just a request to print some stats.
Displayed statistics are very readable.
Sample output :
Oct 14 07:34:14 vpn2 openvpn[20959]: Updated,Fri Oct 14 07:34:14 2016
Oct 14 07:34:14 vpn2 openvpn[20959]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.132,hostname1,213.219.XXX.XXX:63765,Fri Oct 14 07:25:01 2016
Oct 14 07:26:26 vpn2 openvpn[20959]:
10.8.0.242,hostname2,213.219.XXX.XXX:62416,Sun Sep 25 03:49:19 2016
edited Feb 19 '18 at 13:31
Hossein Vatani
1185
1185
answered Oct 14 '16 at 5:33
MichaelCMichaelC
16114
16114
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
add a comment |
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
Thanks for improvement. My answer was right but it lacks an example and explanation. :)
– sekrett
Dec 6 '17 at 16:45
add a comment |
I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file)
.
To get the exact number of client you can do :
- telnet localhost 6666
- status
Then you'll get lot of logs :
10.9.10.11,test-docker,52.58.48.98:56859,Wed May 4 09:37:34 2016
10.9.7.45,test-docker,52.58.156.80:38774,Wed May 4 09:36:59 2016
10.9.1.103,test-docker,52.58.161.230:52201,Wed May 4 09:35:47 2016
GLOBAL STATS
Max bcast/mcast queue length,0
END
>CLIENT:ESTABLISHED,19845
>CLIENT:ENV,n_clients=19361
>CLIENT:ENV,time_unix=1462357164
- look for => >CLIENT:ENV,n_clients=19361
In my case since I have a very large number of client, using the log file is definitely not very practical.
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
add a comment |
I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file)
.
To get the exact number of client you can do :
- telnet localhost 6666
- status
Then you'll get lot of logs :
10.9.10.11,test-docker,52.58.48.98:56859,Wed May 4 09:37:34 2016
10.9.7.45,test-docker,52.58.156.80:38774,Wed May 4 09:36:59 2016
10.9.1.103,test-docker,52.58.161.230:52201,Wed May 4 09:35:47 2016
GLOBAL STATS
Max bcast/mcast queue length,0
END
>CLIENT:ESTABLISHED,19845
>CLIENT:ENV,n_clients=19361
>CLIENT:ENV,time_unix=1462357164
- look for => >CLIENT:ENV,n_clients=19361
In my case since I have a very large number of client, using the log file is definitely not very practical.
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
add a comment |
I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file)
.
To get the exact number of client you can do :
- telnet localhost 6666
- status
Then you'll get lot of logs :
10.9.10.11,test-docker,52.58.48.98:56859,Wed May 4 09:37:34 2016
10.9.7.45,test-docker,52.58.156.80:38774,Wed May 4 09:36:59 2016
10.9.1.103,test-docker,52.58.161.230:52201,Wed May 4 09:35:47 2016
GLOBAL STATS
Max bcast/mcast queue length,0
END
>CLIENT:ESTABLISHED,19845
>CLIENT:ENV,n_clients=19361
>CLIENT:ENV,time_unix=1462357164
- look for => >CLIENT:ENV,n_clients=19361
In my case since I have a very large number of client, using the log file is definitely not very practical.
I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file)
.
To get the exact number of client you can do :
- telnet localhost 6666
- status
Then you'll get lot of logs :
10.9.10.11,test-docker,52.58.48.98:56859,Wed May 4 09:37:34 2016
10.9.7.45,test-docker,52.58.156.80:38774,Wed May 4 09:36:59 2016
10.9.1.103,test-docker,52.58.161.230:52201,Wed May 4 09:35:47 2016
GLOBAL STATS
Max bcast/mcast queue length,0
END
>CLIENT:ESTABLISHED,19845
>CLIENT:ENV,n_clients=19361
>CLIENT:ENV,time_unix=1462357164
- look for => >CLIENT:ENV,n_clients=19361
In my case since I have a very large number of client, using the log file is definitely not very practical.
answered May 4 '16 at 10:24
FlorentFlorent
14315
14315
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
add a comment |
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
your status command helped me, thx
– Mohammed Noureldin
Sep 24 '16 at 15:57
add a comment |
You can also send usr2 signal to openvpn process to make it write statistic information to syslog. This is safe, you don't need to reboot in case you did not enable management interface before.
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:killall -USR2 openvpn
. Then watch the logs. It might be/var/log/syslog
or/var/log/messages
depending on distro.
– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by runningkill -l
.
– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
|
show 1 more comment
You can also send usr2 signal to openvpn process to make it write statistic information to syslog. This is safe, you don't need to reboot in case you did not enable management interface before.
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:killall -USR2 openvpn
. Then watch the logs. It might be/var/log/syslog
or/var/log/messages
depending on distro.
– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by runningkill -l
.
– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
|
show 1 more comment
You can also send usr2 signal to openvpn process to make it write statistic information to syslog. This is safe, you don't need to reboot in case you did not enable management interface before.
You can also send usr2 signal to openvpn process to make it write statistic information to syslog. This is safe, you don't need to reboot in case you did not enable management interface before.
answered Jul 6 '16 at 15:13
sekrettsekrett
1314
1314
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:killall -USR2 openvpn
. Then watch the logs. It might be/var/log/syslog
or/var/log/messages
depending on distro.
– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by runningkill -l
.
– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
|
show 1 more comment
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:killall -USR2 openvpn
. Then watch the logs. It might be/var/log/syslog
or/var/log/messages
depending on distro.
– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by runningkill -l
.
– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
can you write a command for this?
– Shayan_Aryan
Jun 28 '18 at 19:54
@MichaelC wrote it:
killall -USR2 openvpn
. Then watch the logs. It might be /var/log/syslog
or /var/log/messages
depending on distro.– sekrett
Jun 29 '18 at 11:11
@MichaelC wrote it:
killall -USR2 openvpn
. Then watch the logs. It might be /var/log/syslog
or /var/log/messages
depending on distro.– sekrett
Jun 29 '18 at 11:11
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
but it doesn't kill openvpn?
– Shayan_Aryan
Jul 13 '18 at 15:46
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by running kill -l
.– sekrett
Jul 13 '18 at 16:39
kill
command can send different signals, USR2 will not kill, it is just a signal. You can see a list here: linux.org/threads/kill-signals-and-commands-revised.11625 or by running kill -l
.– sekrett
Jul 13 '18 at 16:39
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
I just tried it. It doesn't give the info about connected clients count
– Shayan_Aryan
Jul 16 '18 at 20:49
|
show 1 more comment
Just use sacli with the following command. This will list the connected VPN clients.
/usr/local/openvpn_as/scripts/sacli VPNSummary
{
"n_clients": 15
}
To see all the IPs use this option.
./sacli VPNStatus
add a comment |
Just use sacli with the following command. This will list the connected VPN clients.
/usr/local/openvpn_as/scripts/sacli VPNSummary
{
"n_clients": 15
}
To see all the IPs use this option.
./sacli VPNStatus
add a comment |
Just use sacli with the following command. This will list the connected VPN clients.
/usr/local/openvpn_as/scripts/sacli VPNSummary
{
"n_clients": 15
}
To see all the IPs use this option.
./sacli VPNStatus
Just use sacli with the following command. This will list the connected VPN clients.
/usr/local/openvpn_as/scripts/sacli VPNSummary
{
"n_clients": 15
}
To see all the IPs use this option.
./sacli VPNStatus
edited Sep 17 '18 at 18:38
answered Aug 17 '18 at 15:11
BouncingSolesBouncingSoles
113
113
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f571592%2fhow-to-view-connected-users-to-open-vpn-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown