OpenVPN 在每个时间间隔都会断开连接

OpenVPN 在每个时间间隔都会断开连接

我已经设置了 OpenVPN。服务器是运行 DD-WRT 并设置 OpenVPN 的路由器。客户端是Ubuntu 12.04。连接已建立,没有任何问题。我可以 ping VPN 端的客户端。问题是每隔 5-10 分钟(似乎略有不同),Ubuntu 客户端上就会发生以下情况:

Fri Jan 18 17:01:45 2013 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012
Fri Jan 18 17:01:45 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 18 17:01:45 2013 WARNING: file 'client1.key' is group or others accessible
Fri Jan 18 17:01:45 2013 UDPv4 link local: [undef]
Fri Jan 18 17:01:45 2013 UDPv4 link remote: [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:01:47 2013 [VPN_HOST_NAME] Peer Connection Initiated with [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:01:49 2013 TUN/TAP device tun0 opened
Fri Jan 18 17:01:49 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 18 17:01:49 2013 /sbin/ifconfig tun0 192.168.66.6 pointopoint 192.168.66.5 mtu 1500
Fri Jan 18 17:01:49 2013 WARNING: potential route subnet conflict between local LAN [192.168.1.0/255.255.255.0] and remote VPN [192.168.1.0/255.255.255.0]
Fri Jan 18 17:01:49 2013 Initialization Sequence Completed

Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:10 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Fri Jan 18 17:04:12 2013 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

Fri Jan 18 17:07:11 2013 [VPN_HOST_NAME] Inactivity timeout (--ping-restart), restarting
Fri Jan 18 17:07:11 2013 SIGUSR1[soft,ping-restart] received, process restarting
Fri Jan 18 17:07:13 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 18 17:07:13 2013 Re-using SSL/TLS context
Fri Jan 18 17:07:13 2013 UDPv4 link local: [undef]
Fri Jan 18 17:07:13 2013 UDPv4 link remote: [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:07:14 2013 [VPN_IP_ADDY] Peer Connection Initiated with [AF_INET]VPN_IP_ADDY:1194
Fri Jan 18 17:07:17 2013 Preserving previous TUN/TAP instance: tun0
Fri Jan 18 17:07:17 2013 Initialization Sequence Completed

然后它会自动重新连接,5-10 分钟后它会永远重复这个循环。

即使我通过 VPN 运行 rsync 传输,它也会超时。超时和重新连接不会影响 rsync 传输,除了会延迟 30 秒。除了在尝试重新连接时文件传输将停止 30 秒之外,客户端不会注意到。

我在我的服务器配置中使用“keepalive 10 120”。我还尝试了“keepalive 1 180”,但没有什么区别。

我认为连接拒绝错误是 keepalive ping 尝试?

相关内容