有没有人在使用OpenVPN之前见过这些错误。
Secure Connection Failed
An error occurred during a connection to openvpn.example.com. PR_END_OF_FILE_ERROR
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.我查看了日志文件:/var/log/ openvpnas.log,发现了以下内容:
2021-09-14T19:58:23+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:58:23 2021 myip:11301 Connection reset, restarting [0]'
2021-09-14T19:58:23+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:58:23 2021 myip:11301 SIGUSR1[soft,connection-reset] received, client-instance restarting'
2021-09-14T19:59:13+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:59:13 2021 TCP connection established with [AF_INET]myip:10603'
2021-09-14T19:59:13+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:59:13 2021 Socket flags: TCP_NODELAY=1 succeeded'
2021-09-14T19:59:13+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:59:13 2021 myip:10603 WARNING: Bad encapsulated packet length from peer (5635), which must be > 0 and <= 1627 -- please ensure that --tun-mtu or -
-link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...]'
2021-09-14T19:59:13+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:59:13 2021 myip:10603 Connection reset, restarting [0]'
2021-09-14T19:59:13+0000 [stdout#info] [OVPN 0] OUT: 'Tue Sep 14 19:59:13 2021 myip:10603 SIGUSR1[soft,connection-reset] received, client-instance restarting'我的请求似乎是按照GCP日志记录中的日志向实例发出的。
{ insertId:"148f4tog64jclgg“jsonPay
load: {
connection: {
dest_ip: "*******"
dest_port: 443
protocol: 6
src_ip: "*********"
src_port: ****
}
disposition: "ALLOWED"
instance: {但不知道为什么会掉下来。有没有人有过类似的经历?
发布于 2021-09-15 20:10:30
我联系了OpenVPN支持小组,他们能够帮助确认根本原因,并提供了解决方案。
您的证书或证书的配置有问题。基本上是告诉你出了什么事。
“Errno 2包验证错误:没有这样的文件或目录: u'':
看起来cs.ca_bundle的值是空的。配置键应该完全不存在(没有设置为空),以便返回到内置的自签名证书,或者它应该包含指向包含CA包的文件的路径,或者它应该包含在线的CA证书包。但是它不应该是空的,它看起来是空的。
"error“、”证书验证错误:(“PEM例程”)_名字‘,’没有起跑线“):"error“、”私钥验证错误:(“PEM例程”)_名字‘,’没有起跑线“):
看起来,您在cs.cert和cs.priv_key值中放置的任何内容都是无效的,或者它在那里发现的任何内容都没有一个PEM类型的证书或私钥应该具有的正确的起始行。
难怪网络界面不能正常工作。它没有正确启动所需的东西。我建议您回滚Access Server回自签名证书。这应该会让你的网络界面再次工作。然后将正确和有效的证书放入其中。
我相信这份文件能进一步帮助你:https://openvpn.net/vpn-server-resource .任职/
特别是,这些指令将生成自签名证书,并将其配置为在Access Server中使用(以root用户身份运行命令):
Regenerate self-signed certificates (overwrites existing ones):
cd /usr/local/openvpn_as/scripts/
./certool -d /usr/local/openvpn_as/etc/web-ssl --type ca --unique --cn "OpenVPN Web CA"
./certool -d /usr/local/openvpn_as/etc/web-ssl --type server --remove_csr --sn_off --serial 1 --name server --cn vpn.example.com
./sacli start从配置中删除web证书和密钥(因此它回到您刚刚创建的自签名证书中):
cd /usr/local/openvpn_as/scripts/
./sacli --key "cs.cert" ConfigDel
./sacli --key “cs.priv_key” ConfigDel
./sacli --key "cs.ca_bundle" ConfigDel
./sacli --key "cs.ca_key" ConfigDel
./sacli start感谢@Johnan社区参见完整答案这里
https://serverfault.com/questions/1077578
复制相似问题