我有一个OpenVPN服务器。我很难连接到它。
我已经一步一步地(几次)遵循了如何在Ubuntu18.04上建立OpenVPN服务器上的说明。但是,当我跑的时候
sudo openvpn --config client1.ovpn我得到:
Sat Aug 8 21:45:34 2020 OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Sat Aug 8 21:45:34 2020 library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.08
Sat Aug 8 21:45:34 2020 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Aug 8 21:45:34 2020 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Aug 8 21:45:34 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]185.2.52.91:1194
Sat Aug 8 21:45:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
Sat Aug 8 21:45:34 2020 UDP link local: (not bound)
Sat Aug 8 21:45:34 2020 UDP link remote: [AF_INET]185.2.52.91:1194
Sat Aug 8 21:46:34 2020 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sat Aug 8 21:46:34 2020 TLS Error: TLS handshake failed
Sat Aug 8 21:46:34 2020 SIGUSR1[soft,tls-error] received, process restarting
Sat Aug 8 21:46:34 2020 Restart pause, 5 second(s)
Sat Aug 8 21:46:39 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]185.2.52.91:1194
Sat Aug 8 21:46:39 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
Sat Aug 8 21:46:39 2020 UDP link local: (not bound)
Sat Aug 8 21:46:39 2020 UDP link remote: [AF_INET]185.2.52.91:1194
Sat Aug 8 21:47:39 2020 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sat Aug 8 21:47:39 2020 TLS Error: TLS handshake failed
Sat Aug 8 21:47:39 2020 SIGUSR1[soft,tls-error] received, process restarting
Sat Aug 8 21:47:39 2020 Restart pause, 5 second(s)这是在服务器所在的同一个网络上进行的。我也尝试过从另一个网络连接Android设备,没有多少运气。
client.conf中引入的IP是否必须是可以从https://api.ipify.org/获得的公共IP?client.ovpn的内容似乎是client.conf、密钥、cert和ca文件的连接。是这样的吗?我原以为客户端配置看起来更像ssh键。发布于 2020-08-09 07:14:29
你的问题:
<private ip>:1194”(假设您的服务器监听udp 1194 !)ca、cert和key选项需要文件名,但可以内联指定一些选项。摘录自手册:INLINE FILE SUPPORT
OpenVPN allows including files in the main configuration for the --ca, --cert,
--dh, --extra-certs, --key, --pkcs12, --secret, --crl-verify, --http-proxy-user-pass,
--tls-auth and --tls-crypt options.
Each inline file started by the line <option> and ended by the line </option>PS:您的客户日志只显示您的客户端没有收到来自指定ip &端口的答复(可能是丢失的端口转发?)
https://serverfault.com/questions/1029375
复制相似问题