[SOLVED] howto know status of openvpn client ?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
[SOLVED] howto know status of openvpn client ?
Hello All,
howto know status of openvpn client connected to server.
in openvpn --status when done with server side it shows status of all connected client,
but if I am running as client mode and connecting to server in daemon mode
how can i know status of client ( what if there are many ?) ? like in --status ?
Thanking YOu
Tushar
howto know status of openvpn client connected to server.
in openvpn --status when done with server side it shows status of all connected client,
but if I am running as client mode and connecting to server in daemon mode
how can i know status of client ( what if there are many ?) ? like in --status ?
Thanking YOu
Tushar
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: howto know status of openvpn client ?
you can use --status or at least the management interface on the client side as well - this gives you a programmatic way to check if a client is up and running.
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
Dear Jan Just,
--status on client side shows like this
Status
OPen VPN STATISTICS
Updated Fri Feb 10:43
TUN/TAP read bytes 1231
TUN/TAP write bytes 1072
Auth read bytes xxxx
END
I don't know to parse this whether client is connected or not.
and using management interface i need to telnet to particular, I want that whenever client succesfully authenticates its status something like Peer Connection With 192.168.103.61 Initiated to be stored in file so that i can retrieve it any time.
can i use ?
--client-connect script
--route-up
Thanking You
Tushar
--status on client side shows like this
Status
OPen VPN STATISTICS
Updated Fri Feb 10:43
TUN/TAP read bytes 1231
TUN/TAP write bytes 1072
Auth read bytes xxxx
END
I don't know to parse this whether client is connected or not.
and using management interface i need to telnet to particular, I want that whenever client succesfully authenticates its status something like Peer Connection With 192.168.103.61 Initiated to be stored in file so that i can retrieve it any time.
can i use ?
--client-connect script
--route-up
Thanking You
Tushar
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
i have even tried changing status-version 1,2,3 but same results.
Thanking You
Tushar
Thanking You
Tushar
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
Do i need to grep output from log files ??
Thanking You
Tushar
Thanking You
Tushar
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: howto know status of openvpn client ?
the fact that bytes are read from and written to the tun/tap adapter is an indication that the VPN is functional; other than that there is no (easy) method to see whether the VPN is active; your best bet is to simply ping the VPN server IP.TUN/TAP read bytes 1231
TUN/TAP write bytes 1072
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
Dear JanJust,
I got some info regarding use of management client to display status of client on GUI interface, I didnt exactly
got what they actually want to convey but i will try other way and will try to look in more detail what you have suggested.
I got some info regarding use of management client to display status of client on GUI interface, I didnt exactly
got what they actually want to convey but i will try other way and will try to look in more detail what you have suggested.
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
Hey JanJust, i have determine whether client is connected or not using management interface
and state command in that. I have opened tcp socket on management interface and determine status of client using state command.
Still It is giving only whether client is connected or not, and i want time too i.e from when since client is connected. This information is even not there in status command.
From where can i get whether particular client instance is connected and time since when it is connected. ?
Thanking You
tushar
and state command in that. I have opened tcp socket on management interface and determine status of client using state command.
Still It is giving only whether client is connected or not, and i want time too i.e from when since client is connected. This information is even not there in status command.
From where can i get whether particular client instance is connected and time since when it is connected. ?
Thanking You
tushar
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: howto know status of openvpn client ?
you can only get that information by parsing the client connect logs; alternatively you could use an 'up' and 'down' script to launch an external program which records the date&time.
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: howto know status of openvpn client ?
Dear JanJust,
Done that using up and down script as suggest by Dazo on irc channel..Thanks for replying.
Thanking You,
Tushar
Done that using up and down script as suggest by Dazo on irc channel..Thanks for replying.
Thanking You,
Tushar