OpenVPN(Tunnelblick和Viscosity)连接几乎正好10分钟

原始问题在这里: https : //apple.stackexchange.com/questions/77245/viscosity-openvpn-tunnelblick-connect-but-all-rdp-connections-go-dead-after-abou

我的VPN连接似乎罚款几乎正好10分钟。

这里是日志:

Jan 08 09:37:05: Viscosity Mac 1.4.2 (1092) Jan 08 09:37:05: Viscosity OpenVPN Engine Started Jan 08 09:37:05: Running on Mac OS X 10.8.2 Jan 08 09:37:05: --------- Jan 08 09:37:05: Checking reachability status of connection... Jan 08 09:37:05: Connection is reachable. Starting connection attempt. Jan 08 09:37:08: OpenVPN 2.2.1 x86_64-apple-darwin10.8.0 [SSL] [LZO2] [PKCS11] [eurephia] built on Aug 1 2011 Jan 08 09:37:07: IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Jan 08 09:37:07: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Jan 08 09:37:07: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables Jan 08 09:37:09: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this Jan 08 09:37:09: LZO compression initialized Jan 08 09:37:09: UDPv4 link local (bound): [undef]:1194 Jan 08 09:37:09: UDPv4 link remote: 216.23.154.30:1194 Jan 08 09:37:10: [vpp-vpn001.verrus.com] Peer Connection Initiated with 216.23.154.30:1194 Jan 08 09:37:12: TUN/TAP device /dev/tun0 opened Jan 08 09:37:12: /sbin/ifconfig tun0 delete Jan 08 09:37:12: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure Jan 08 09:37:12: /sbin/ifconfig tun0 10.103.11.145 10.103.11.146 mtu 1500 netmask 255.255.255.255 up Jan 08 09:37:12: Initialization Sequence Completed Jan 08 09:57:15: [vpp-vpn001.verrus.com] Inactivity timeout (--ping-restart), restarting Jan 08 09:57:15: SIGUSR1[soft,ping-restart] received, process restarting Jan 08 09:57:16: IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Jan 08 09:57:16: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Jan 08 09:57:16: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables Jan 08 09:57:16: LZO compression initialized Jan 08 09:57:16: UDPv4 link local (bound): [undef]:1194 Jan 08 09:57:16: UDPv4 link remote: 216.23.154.30:1194 Jan 08 09:57:17: [vpp-vpn001.verrus.com] Peer Connection Initiated with 216.23.154.30:1194 Jan 08 09:57:19: TUN/TAP device /dev/tun0 opened Jan 08 09:57:19: /sbin/ifconfig tun0 delete Jan 08 09:57:19: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure Jan 08 09:57:19: /sbin/ifconfig tun0 10.103.11.145 10.103.11.146 mtu 1500 netmask 255.255.255.255 up Jan 08 09:57:19: Initialization Sequence Completed 

粘度似乎需要大约10分钟才能注意到连接失败并试图重新协商。 我的路由表似乎没有改变。 我试过并能够在Tunnelblick和Viscosity中复制这个行为。

实际上我可以在10分钟的时间内10秒钟内把吞吐量降到0。

我的理论是,它围绕着DHCP租约时间,但我还没有能够弄清楚如何检查OSX上的OpenVPN tun接口。

 Jan 08 09:57:15: [vpp-vpn001.verrus.com] Inactivity timeout (--ping-restart), restarting 

从这一行中可以清楚地看到,在服务器端有一个空闲的超时设置。 所以,如果有人在20分钟内不做任何事情(这不是10分钟,我可以从日志中看到),然后服务器重置连接。

你能检查一下服务器端吗? 可能会像keepalive 10 120 。 不知道。 你需要查看server.conf文件。