首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >openvpn错误: TLS错误: TLS密钥协商在60秒内失败

openvpn错误: TLS错误: TLS密钥协商在60秒内失败
EN

Stack Overflow用户
提问于 2011-11-02 21:59:56
回答 3查看 14.4K关注 0票数 1

我有一个关于实现openvpn的问题,所以我在这里,希望有人能帮助我。

故事:

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

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

代码语言:javascript
运行
复制
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手册本身都说它是由服务器的防火墙配置引起的

以下是我的规则:

代码语言:javascript
运行
复制
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
EN

回答 3

Stack Overflow用户

发布于 2019-06-11 02:47:12

请在服务器端检查您的日志。在我的例子中,TLS密钥协商错误和用户丢弃是由于OpenVPN实现了最大客户端。我从5个变成了10个,工作起来很有魅力。只需检查您的服务器日志。

票数 2
EN

Stack Overflow用户

发布于 2013-02-06 13:30:20

尝试在*.ovpn配置文件中添加以下命令:

代码语言:javascript
运行
复制
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

并使用cmd打开openvpn:

代码语言:javascript
运行
复制
openvpn --cd /Path/to/your/configs --config *.ovpn 
票数 0
EN

Stack Overflow用户

发布于 2017-01-18 05:55:47

取消注释客户端会议{ovpn}文件中的TLS-Auth密钥并验证服务器ta.key后,此错误已清除

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7981594

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档