Hello all, I tried to search the forum for this , but most search terms come up as too common??
What i would like to know how to do is, how to drop/disconnect a specific connected user/client?
So joe blow is connected, he did something bad or he was fired, but is currently connected, i need to be able to drop his connection without disturbing others that are connected.
How do i do this?
Thanks..
Disconnect connected user
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: Disconnect connected user
Revoke the user`s certificate or write disable in user`s ccd file, I guess the first option is how it should be done.
Then log on to management interface and type help:
I`m sure there will be better ways...let`s hear it from the knowledgeable
Then log on to management interface and type help:
If you kill the connection without ccd disable or revoking certificate, the client can still reconnect.login as: root
root@xxx.xxx.xxx.xxx's password:
ovpn01b> telnet 127.0.0.1 1197
>INFO:OpenVPN Management Interface Version 1 -- type 'help' for more info
help
Management Interface for OpenVPN 2.3.6 armle-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Aug 11 2015
Commands:
...
...
kill cn : Kill the client instance(s) having common name cn.
kill IP:port : Kill the client instance connecting from IP:port.
...
...
END
I`m sure there will be better ways...let`s hear it from the knowledgeable
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Apr 20, 2017 1:01 pm
Re: Disconnect connected user
Apparently i cannot connect to port 1197 on localhost.
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: Disconnect connected user
Hello,
For example in server config:
Please read --management in manual:
https://openvpn.net/index.php/open-sour ... nuals.html
And:
https://openvpn.net/index.php/open-sour ... rface.html
https://github.com/OpenVPN/openvpn/tree/master/doc
Another option could be to block the user`s WAN IP in firewall...
For example in server config:
Code: Select all
management 127.0.0.1 1197
https://openvpn.net/index.php/open-sour ... nuals.html
And:
https://openvpn.net/index.php/open-sour ... rface.html
https://github.com/OpenVPN/openvpn/tree/master/doc
Another option could be to block the user`s WAN IP in firewall...