在NAT后面有一台openvpn服务器。 当我尝试从客户端连接到它 – 我得到这个错误:
read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
我为TCP和UDP在我的路由器中configuration了1194端口的转发。 这里是服务器的configuration文件:
port 1194 proto udp dev tun ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/server.crt key /etc/openvpn/easy-rsa/keys/server.key # This file should be kept secret dh dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt keepalive 10 120 comp-lzo persist-key persist-tun status openvpn-status.log verb 3
这里是我的客户的configuration:
client dev tun proto udp remote XXX.XXX.XXX.XXX 1194 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert my-laptop.crt key my-laptop.key ns-cert-type server comp-lzo verb 3
我试图按照这个快速入门教程,但由于某种原因,它并没有帮助我快速启动。
检查你的证书 – (使用OpenSSL来做到这一点)。 尝试使用格式不正确的证书和/或密钥时,我看到了此错误。
如果你的证书没问题 – 尝试切换到TCP,看看是否有帮助。