大网数据广告活动
服务器运维问答

How to disconnect a single client connection in OpenVPN?

· 52CE 我爱测

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 conn…

问题原文

原帖链接 · emmdee · CC BY-SA 3.0

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

已采纳解答

原帖链接 · Zoredache · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-03-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。