如何从Ubuntu盒子连接到AWS Client VPN?

时间:2019-03-18 05:34:55

标签: amazon-web-services ubuntu vpn

我已经使用此guide创建了aws vpn客户端终结点。现在,我想从我的Ubuntu框中连接到此vpn端点。

为此,我已经下载了客户端证书,并使用此guide使用TLS身份验证方法连接到vpn。

但是当我尝试从网络管理器连接到VPN时,我变得超时了。

注意:我已经打开了系统的所有UDP流量。

下面是syslog的输出。请让我知道出了什么问题。

~$ org.gtk.vfs.Daemon[2480]: message repeated 3 times: [ ** (process:17599): WARNING **: Couldn't create directory monitor on smb://x-gnome-default-workgroup/. Error: The specified location is not mounted]
~$ NetworkManager[30373]: <info>  [1552886812.2980] audit: op="connection-activate" uuid="705a6afa-a5b0-420b-858e-4feae6244a63" name="Client-VPC" pid=2697 uid=1001 result="success"
~$ NetworkManager[30373]: <info>  [1552886812.3117] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: Started the VPN service, PID 9091
~$ NetworkManager[30373]: <info>  [1552886812.3297] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: Saw the service appear; activating connection
~$ NetworkManager[30373]: nm-openvpn-Message: openvpn[9094] started
~$ NetworkManager[30373]: <info>  [1552886812.3394] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN plugin: state changed: starting (3)
~$ NetworkManager[30373]: <info>  [1552886812.3394] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN connection: (ConnectInteractive) reply received
~$ nm-openvpn[9094]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
~$ nm-openvpn[9094]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
~$ nm-openvpn[9094]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
~$ nm-openvpn[9094]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
~$ nm-openvpn[9094]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
~$ nm-openvpn[9094]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
~$ nm-openvpn[9094]: UDPv4 link local: [undef]
~$ nm-openvpn[9094]: UDPv4 link remote: [AF_INET] **.**.**.**:1194
~$ nm-openvpn[9094]: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
~$ nm-openvpn[9094]: TLS Error: TLS handshake failed
~$ nm-openvpn[9094]: SIGUSR1[soft,tls-error] received, process restarting
~$ NetworkManager[30373]: <warn>  [1552886872.9227] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN connection: connect timeout exceeded.
~$ NetworkManager[30373]: libnm-Message: Connect timer expired, disconnecting.
~$ NetworkManager[30373]: nm-openvpn-Message: openvpn[9094]: send SIGTERM
~$ nm-openvpn[9094]: SIGTERM[hard,init_instance] received, process exiting
~$ NetworkManager[30373]: <warn>  [1552886872.9266] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN plugin: failed: connect-failed (1)
~$ NetworkManager[30373]: nm-openvpn-Message: openvpn[9094] exited with success
~$ NetworkManager[30373]: <info>  [1552886872.9273] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN plugin: state changed: stopping (5)
~$ NetworkManager[30373]: <info>  [1552886872.9277] vpn-connection[0x2501430,705a6afa-a5b0-420b-858e-4feae6244a63,"Client-VPC",0]: VPN plugin: state changed: stopped (6)
~$ org.freedesktop.Notifications[2480]: ** (notify-osd:2694): WARNING **: dnd_is_idle_inhibited(): got error "The name org.gnome.SessionManager was not provided by any .service files"

对此将提供任何帮助。

谢谢。

1 个答案:

答案 0 :(得分:0)

关注this guide

有时候,网络文档中缺少一些额外的步骤,例如:

  

创建客户端vpn端点后,控制台将显示DNS名称,例如,“   cvpn-endpoint-0102bc4c2e49f1e44.prod.clientvpn.us-west-2.amazonaws.com”。当您   需要指定DNS名称,必须在显示的前面指定一个随机字符串   名称,以便格式为“ [随机字符串]。显示的DNS名称,例如,” asdfa.cvpnendpoint-0102bc4c2e49f1e44.prod.clientvpn.us-west-2.amazonaws.com”。