11

Would like to forcefully kick a specific user connection.

OS is Ubuntu 16, OVPN Server is OpenVPN 2.3.10

I can see them connected in /etc/openvpn/openvpn-status.log which lists out current client status. And their persistent connection pool is saved to /etc/openvpn/ipp.txt

I can kick all users by simply cycling the openvpn daemon service openvpn restart however I want to kick ONE single user.

I've tried openvpn --help and man openvpn as well as searched google but not seeing anything.

OS is Ubuntu 16, Server is OpenVPN 2.3.10

1 Answer 1

14

Doing this requires some preparation ahead of time. Specifically you need to enable the Management port (--management IP port). With the management port enabled you can connect to that management port using telnet/netcat and then you can issue commands to disconnect a session (eg kill client-name).

See this page for more about the usage of that interface.

2
  • Wow thanks so much. Interesting this doc didn't come up while searching various keywords.
    – emmdee
    Mar 9, 2018 at 5:27
  • This is a brute force solution and not a great user experience. Because you only kill the connection. The user still believes to be connected to the server. Ideally a disconnect signal should be sent to the user so that the client disconnects properly.
    – Houman
    May 11, 2021 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .