我有openvpn服务器。 configuration文件中没有“duplicate-cn”。
我的行动顺序:
如何断开客户端A?
服务器configuration:
port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh2048.pem topology subnet server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway def1 bypass-dhcp" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 tls-auth ta.key 0 comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log log-append openvpn.log verb 3 crl-verify /etc/openvpn/crl.pem
客户端configuration:
client dev tun proto udp remote example.com 1194 resolv-retry infinite nobind persist-key persist-tun pkcs12 client.p12 remote-cert-tls server tls-auth ta.key 1 comp-lzo verb 3
您的服务器configuration中有keepalive 10 120 ,其扩展如下:
ping 10 ping-restart 240 push "ping 10" push "ping-restart 120"
你可以用这样的东西replacekeepalive指令:
ping 10 ping-restart 240 push "ping 10" push "ping-exit 60"
这会导致客户端在60秒后通过而不会收到来自远程的ping或其他数据包。