【发布时间】:2019-08-08 10:47:50
【问题描述】:
我已使用此 guide 创建 aws vpn 客户端端点。现在我想从我的 ubuntu 盒子连接到这个 vpn 端点。
为此,我已经下载了客户端证书并使用此guide 使用 TLS 身份验证方法连接到 vpn。
但是当我尝试从我的网络管理器连接到 VPN 时,我会超时。
注意:我已经为我的系统打开了所有 UDP 流量。
下面是系统日志的输出。请让我知道出了什么问题。
~$ 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"
对此的任何帮助将不胜感激。
提前致谢。
【问题讨论】:
-
我假设您关注了您链接的整个页面。您个人网络上的 IP 地址范围是多少,大多数路由器是 192.168.0.0,有些是 10.0.0.0,您连接的子网范围也是多少。如果它们相同,您将无法连接到该网络。
-
你提到你提供了 UDP 访问,你的 VPN 客户端应该有所有流量 UDP 和 TCP 到 VPN 网关
-
日志文件抱怨证书。你打开vpn客户端是否正确。您可以将证书放在客户端配置文件中或作为文件放在 config 文件夹中。在此处查看示例:wiki.teltonika.lt/view/OpenVPN_configuration_examples
-
使用的CIDR块与子网的不同。我能够根据您共享的链接连接到 VPN。但我仍然无法使用私有 IP 连接到 ec2 机器。我不确定我哪里出错了。
-
第一个测试,打开 ssh 到 0.0.0.0 VPN 看它是否有效。如果是,那么它是 ec2 实例的安全组上的 IP 问题,如果不是,那么它要么是从 VPN 到 EC2 实例的路由问题,要么是 VPN 上的端口被阻止。
标签: amazon-web-services ubuntu vpn