如何从 shell 连接到 openvpn

如何从 shell 连接到 openvpn

我正在尝试从 ubuntu shell 连接到客户端 VPN (OpenVPN)。在 Mac 上,我可以使用 tunnelblick 来完成此操作,但现在我需要从 ubuntu 服务器来完成此操作。

我努力了:

cabox@box-codeanywhere:~/vpn_config/openvpn-files$ ls
AVORA-duo.conf  ca.crt  luca.puggini.crt  luca.puggini.key
cabox@box-codeanywhere:~/vpn_config/openvpn-files$ openvpn AVORA-duo.conf
Mon Jul  2 03:51:57 2018 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Feb  4 2014
Enter Auth Username:luca.puggini
Enter Auth Password:
Mon Jul  2 03:52:28 2018 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Mon Jul  2 03:52:28 2018 Socket Buffers: R=[133120->131072] S=[133120->131072]
Mon Jul  2 03:52:28 2018 UDPv4 link local: [undef]
Mon Jul  2 03:52:28 2018 UDPv4 link remote: [AF_INET]54.77.214.131:1194
Mon Jul  2 03:53:28 2018 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Mon Jul  2 03:53:28 2018 TLS Error: TLS handshake failed
Mon Jul  2 03:53:28 2018 SIGUSR1[soft,tls-error] received, process restarting
Mon Jul  2 03:53:28 2018 Restart pause, 2 second(s)
Mon Jul  2 03:53:30 2018 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Mon Jul  2 03:53:30 2018 Socket Buffers: R=[133120->131072] S=[133120->131072]
Mon Jul  2 03:53:30 2018 UDPv4 link local: [undef]
Mon Jul  2 03:53:30 2018 UDPv4 link remote: [AF_INET]54.77.214.131:1194

但我不认为它起作用了,因为我无法访问本地服务。(我在codeanywhereshell 上运行)

如何使用这个openvpn函数?我是否应该将它传递给其他文件(.crt

答案1

看起来你错过了配置參數?

对于你来说,情况是这样的:

openvpn --config AVORA-duo.conf

..如果所有文件都存储在文件夹中/etc/openvpn/,那么它将在启动时自动加载(当然假设 openvpn 是启动的一部分)。

相关内容