VPN 未连接

VPN 未连接

我的 VPN 连接不起作用。它以前在 ubuntu 17.04 上运行良好,现在升级(重新安装)后无法建立连接。此命令的结果:

openvpn vpnbook-euro1-tcp443.ovpn

Sat Nov  4 13:55:24 2017 OpenVPN 2.4.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul  3 2017
Sat Nov  4 13:55:24 2017 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Enter Auth Username: vpnbook
Enter Auth Password: *******
Sat Nov  4 13:55:55 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sat Nov  4 13:55:55 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sat Nov  4 13:55:55 2017 NOTE: --fast-io is disabled since we are not using UDP
Sat Nov  4 13:55:55 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]176.126.237.217:443
Sat Nov  4 13:55:55 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Sat Nov  4 13:55:55 2017 Attempting to establish TCP connection with [AF_INET]176.126.237.217:443 [nonblock]
Sat Nov  4 13:55:56 2017 TCP: connect to [AF_INET]176.126.237.217:443 failed: Connection refused
Sat Nov  4 13:55:56 2017 SIGUSR1[connection failed(soft),init_instance] received, process restarting
Sat Nov  4 13:55:56 2017 Restart pause, 5 second(s)

似乎连接被拒绝了,但我不知道为什么。我确定是我的设置有问题,因为之前一切都正常。

当我使用网络管理器启动 vpn 连接时,这是我的 /var/log/syslog 文件的一部分:

Nov  5 00:15:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837330.8162] audit: op="connection-activate" uuid="5dc39521-da6e-4a1d-843f-0b1bdcd02e8d" name="2" pid=1408 uid=1000 result="success"
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: Can't set a parent on widget which has a parent
Nov  5 00:15:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837330.8260] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: Started the VPN service, PID 2773
Nov  5 00:15:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837330.8401] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: Saw the service appear; activating connection
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: Can't set a parent on widget which has a parent
Nov  5 00:15:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837330.8779] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN plugin: state changed: starting (3)
Nov  5 00:15:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837330.8781] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN connection: (ConnectInteractive) reply received
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: file '/etc/openvpn/key.key' is group or others accessible
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-openvpn[2776]: OpenVPN 2.4.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul  3 2017
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-openvpn[2776]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Nov  5 00:15:30 matej-GA-MA770-UD3 nm-applet[1408]: Can't set a parent on widget which has a parent
Nov  5 00:15:31 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:15:31 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:15:31 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:15:36 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:15:36 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:15:36 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:15:41 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:15:41 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:15:41 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:15:46 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:15:46 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:15:46 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:15:51 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:15:51 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:15:51 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:16:01 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:16:01 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:16:01 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:16:21 matej-GA-MA770-UD3 nm-openvpn[2776]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Nov  5 00:16:21 matej-GA-MA770-UD3 nm-openvpn[2776]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Nov  5 00:16:21 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGUSR1[soft,private-key-password-failure] received, process restarting
Nov  5 00:16:30 matej-GA-MA770-UD3 NetworkManager[557]: <warn>  [1509837390.8944] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN connection: connect timeout exceeded.
Nov  5 00:16:30 matej-GA-MA770-UD3 nm-openvpn-serv[2773]: Connect timer expired, disconnecting.
Nov  5 00:16:30 matej-GA-MA770-UD3 nm-openvpn[2776]: SIGTERM[hard,init_instance] received, process exiting
Nov  5 00:16:30 matej-GA-MA770-UD3 NetworkManager[557]: <warn>  [1509837390.9110] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN plugin: failed: connect-failed (1)
Nov  5 00:16:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837390.9111] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN plugin: state changed: stopping (5)
Nov  5 00:16:30 matej-GA-MA770-UD3 NetworkManager[557]: <info>  [1509837390.9111] vpn-connection[0x55aaff4e60f0,5dc39521-da6e-4a1d-843f-0b1bdcd02e8d,"2",0]: VPN plugin: state changed: stopped (6)
Nov  5 00:16:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:16:30 matej-GA-MA770-UD3 nm-applet[1408]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Nov  5 00:16:30 matej-GA-MA770-UD3 nm-applet[1408]: Can't set a parent on widget which has a parent

答案1

TCP: connect to [AF_INET]176.126.237.217:443 failed: Connection refused 

是解决问题的关键。服务器不接受 TCP 端口 443 上的连接。

相关内容