linux - 打开VPN错误: TLS Error: TLS key negotiation failed to occur within 60 seconds

标签 linux networking ssl openvpn

<分区>

我在 openvpn 的实现上遇到了问题所以我在这里,希望有人能帮助我

故事:

我在 ubuntu 服务器 VPS 上安装了 openvpn 服务器,我使用 tun 点对点而不是 tap 网桥。 没有服务器配置错误导致的错误。

当我在客户端发出 openvpn client.conf 命令时,它会给我:

Thu Oct 27 15:17:39 2011 OpenVPN 2.1.0 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jul 12 2010
Thu Oct 27 15:17:39 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Oct 27 15:17:39 2011 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Thu Oct 27 15:17:39 2011 LZO compression initialized
Thu Oct 27 15:17:39 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Thu Oct 27 15:17:39 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Thu Oct 27 15:17:39 2011 Local Options hash (VER=V4): '69109d17'
Thu Oct 27 15:17:39 2011 Expected Remote Options hash (VER=V4): 'c0103fa8'
Thu Oct 27 15:17:39 2011 Attempting to establish TCP connection with [AF_INET]VPS_IP_ADDR:4242 [nonblock]
Thu Oct 27 15:17:40 2011 TCP connection established with [AF_INET]VPS_IP_ADDR:PORT_NUM
Thu Oct 27 15:17:40 2011 Socket Buffers: R=[87380->131072] S=[16384->131072]
Thu Oct 27 15:17:40 2011 TCPv4_CLIENT link local: [undef]
Thu Oct 27 15:17:40 2011 TCPv4_CLIENT link remote: [AF_INET]VPS_IP_ADDR:4242
Thu Oct 27 15:17:40 2011 TLS: Initial packet from [AF_INET]VPS_IP_ADDR:4242, sid=b78095e0 079e400c
Thu Oct 27 15:18:40 2011 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Thu Oct 27 15:18:40 2011 TLS Error: TLS handshake failed
Thu Oct 27 15:18:40 2011 Fatal TLS error (check_tls_errors_co), restarting
Thu Oct 27 15:18:40 2011 TCP/UDP: Closing socket
Thu Oct 27 15:18:40 2011 SIGUSR1[soft,tls-error] received, process restarting
Thu Oct 27 15:18:40 2011 Restart pause, 5 second(s)

当我用谷歌搜索这个问题时,我发现人们和 openvpn 手册本身都说这是由服务器的防火墙配置引起的

这是我的规则:

iptables -A INPUT -p tcp --dport 4242 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 4242 -j ACCEPT
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to VPS_IP_ADDR

最佳答案

请在服务器端检查您的日志。 在我的案例中,TLS key 协商错误和用户丢失是由于 OpenVPN Maximum client was achieveed。我从 5 变成了 10,工作起来很有魅力。只需检查您的服务器日志。

关于linux - 打开VPN错误: TLS Error: TLS key negotiation failed to occur within 60 seconds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7981594/

相关文章:

linux - bash 重命名空间 - 也做子文件和文件夹

android - android中的图片懒加载

ssl - 在 Websphere Application Server 上禁用 SSL

c - shmat 返回 errno=13(EACCES) 的段错误

linux - 将一个二进制文件的部分 stdout 输出替换为另一个二进制文件的输出的 unix 命令是什么?

linux - 如何使用文件协议(protocol)访问本地系统上的目录?

java - 如何用Java实现多线程Web服务器

c# - 获取未使用的 IP 地址

http - 是否可以回答发送到本地网络广播地址的 http 请求?

c# - Azure 连接设置中的 Web API 因大请求而失败