![客户端下载种子时 OpenVPN 服务器停止响应](https://linux22.com/image/718075/%E5%AE%A2%E6%88%B7%E7%AB%AF%E4%B8%8B%E8%BD%BD%E7%A7%8D%E5%AD%90%E6%97%B6%20OpenVPN%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%81%9C%E6%AD%A2%E5%93%8D%E5%BA%94.png)
我家里的 Windows 10 机器上运行着一个 OpenVPN 服务器。该服务器位于 CISCO 路由器后面,并设置了静态路由。它运行完美,可以重定向互联网流量,处理多个客户端,并且可以通过 Windows 客户端进行种子下载。
但是,我刚刚尝试从 Linux 客户端(Elementary OS)下载种子,当种子客户端尝试连接时,VPN 停止工作。我尝试了 qBitTorrent 和 Transmission,它们在 Windows 客户端上运行完美。发生这种情况后,没有新的客户端可以连接,所有现有客户端都失去连接。解决此问题的唯一方法是重新启动 OpenVPN 服务器。
我以为是防火墙/SPI 问题,所以我在路由器上禁用了这两者,但这没有任何改变。我还尝试更改客户端上的 MTU 设置。这是我的完整服务器配置:
dev tun
proto udp
port 1155
ca ca.crt
cert server.crt
key server.key
dh dh4096.pem
duplicate-cn
topology subnet
server 10.8.0.0 255.255.255.0
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "redirect-gateway def1"
client-to-client
keepalive 10 120
remote-cert-tls client
tls-version-min 1.2
tls-auth ta.key 0
cipher AES-256-CBC
auth SHA256
auth-nocache
comp-lzo
persist-key
persist-tun
status openvpn-status.log
status-version 3
verb 3
任何想法都将不胜感激!
编辑1:断开 OpenVPN 服务器(从 GUI)会导致其挂起,直到强制停止。
编辑2:连接停止时,服务器日志详细级别为 6:
Fri Feb 23 18:16:14 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:16:24 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:16:35 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:16:45 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:16:55 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:17:05 2018 {profile-name}/{client-ip} UDPv6 WRITE [38] to [AF_INET6]::ffff:{client-ip}:57317: P_DATA_V1 kid=0 DATA len=37
客户端日志:
Fri Feb 23 18:20:01 2018 us=463024 TUN READ [76]
Fri Feb 23 18:20:01 2018 us=463061 UDP WRITE [101] to [AF_INET]{server-ip}:{port}: P_DATA_V2 kid=0 DATA len=100
Fri Feb 23 18:20:01 2018 us=535515 TUN READ [132]
Fri Feb 23 18:20:01 2018 us=535573 UDP WRITE [157] to [AF_INET]{server-ip}:{port}: P_DATA_V2 kid=0 DATA len=156
Fri Feb 23 18:20:06 2018 us=535976 TUN READ [93]
Fri Feb 23 18:20:06 2018 us=536044 UDP WRITE [118] to [AF_INET]{server-ip}:{port}: P_DATA_V2 kid=0 DATA len=117
Fri Feb 23 18:20:09 2018 us=925150 UDP READ [38] from [AF_INET]{server-ip}:{port}: P_DATA_V1 kid=0 DATA len=37
Fri Feb 23 18:20:11 2018 us=536196 TUN READ [132]
Fri Feb 23 18:20:11 2018 us=536258 UDP WRITE [157] to [AF_INET]{server-ip}:{port}: P_DATA_V2 kid=0 DATA len=156
Fri Feb 23 18:20:11 2018 us=712774 TUN READ [76]
Fri Feb 23 18:20:11 2018 us=712829 UDP WRITE [101] to [AF_INET]{server-ip}:{port}: P_DATA_V2 kid=0 DATA len=100