OpenVPN 客户端配置无连接

OpenVPN 客户端配置无连接

我尝试在 OpenVPN 服务器中使用 SoftEther VPN 服务器,下载具有不同端口的 OpenVpn 配置文件,禁用防火墙,并添加 openvpn 端口

当我尝试使用 openvpn 客户端时出现错误:

Wed Nov 20 13:03:28 2019 Need hold release from management interface, waiting...
Wed Nov 20 13:03:28 2019 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25343
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'state on'
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'log all on'
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'echo all on'
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'bytecount 5'
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'hold off'
Wed Nov 20 13:03:28 2019 MANAGEMENT: CMD 'hold release'
Wed Nov 20 13:03:30 2019 MANAGEMENT: CMD 'username "Auth" "mohsen"'
Wed Nov 20 13:03:30 2019 MANAGEMENT: CMD 'password [...]'
Wed Nov 20 13:03:30 2019 MANAGEMENT: >STATE:1574242410,RESOLVE,,,,,,
Wed Nov 20 13:03:30 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]85.18.xxx.xxx:50179
Wed Nov 20 13:03:30 2019 Socket Buffers: R=[65536->65536] S=[65536->65536]
Wed Nov 20 13:03:30 2019 Attempting to establish TCP connection with [AF_INET]85.18.xxx.xxx:50179 [nonblock]
Wed Nov 20 13:03:30 2019 MANAGEMENT: >STATE:1574242410,TCP_CONNECT,,,,,,

Openvpn 配置文件如下:

dev tap
proto udp
remote 85.18.xxx.xxx 50179
cipher AES-128-CBC
auth SHA1
resolv-retry infinite
nobind
persist-key
persist-tun
client
verb 3
auth-user-pass

<ca>
-----BEGIN CERTIFICATE-----
key... for security hidden key
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
key... for security hidden key
-----END CERTIFICATE-----

</cert>

<key>
-----BEGIN PRIVATE KEY-----
key... for security hidden key
-----END PRIVATE KEY-----

</key>

错误是

2019 年 11 月 20 日星期三 13:05:30 TCP:连接到 [AF_INET]85.18.xxx.xxx:50179 失败:未知错误

答案1

Unknown error通常表示 OpenVPN 客户端无法连接到服务器。该端口是否在服务器上运行,客户端是否可以访问服务器?是否有任何防火墙规则可能会阻止连接?

相关内容