我最近安装了 Ubuntu 16.04 并尝试配置 OpenVPN 客户端。当我将文件复制client.conf
到/etc/openvpn
文件夹时,VPN 连接会自动建立。但我需要在 GUI 中配置它并安装network-manager-openvpn-gnome
,然后在选择连接类型选项卡中看到“导入已保存的 vpn 配置”菜单...客户端配置文件是从 VPN 服务器下载的自动登录配置文件。
当我尝试导入时,client.ovpn
出现错误提示
“无法导入 VPN 连接”无法读取文件“client.ovpn”或不包含可识别的 VPN 连接信息 - 错误:插件不支持导入功能。
内容client.ovpn
# Automatically generated OpenVPN client config file
# Generated on Sat Aug 31 16:25:23 2016 by openvpnas
# Note: this config file contains inline private keys
# and therefore should be kept confidential!
# Note: this configuration is user-locked to the username below
# OVPN_ACCESS_SERVER_USERNAME=testuser
# Define the profile name of this particular configuration file
# [email protected]/AUTOLOGIN
# OVPN_ACCESS_SERVER_AUTOLOGIN=1
# OVPN_ACCESS_SERVER_CLI_PREF_ALLOW_WEB_IMPORT=True
# OVPN_ACCESS_SERVER_CLI_PREF_BASIC_CLIENT=False
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_CONNECT=True
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_XD_PROXY=True
# OVPN_ACCESS_SERVER_WSHOST=vpnserver.abcde.com:444
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_START
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_STOP
# OVPN_ACCESS_SERVER_IS_OPENVPN_WEB_CA=0
# OVPN_ACCESS_SERVER_ORGANIZATION=VPN to BANGALORE SERVER
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
remote vpnserver.abcde.com 1194 udp
remote vpnserver.abcde.com 444 tcp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
# NOTE: LZO commands are pushed by the Access Server at connect time.
# NOTE: The below line doesn't disable LZO.
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key (Server Agent)
#
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
## -----BEGIN RSA SIGNATURE-----
## DIGEST:sha256
##
## -----END RSA SIGNATURE-----
答案1
答案2
您可以尝试拆分:
remote vpnserver.abcde.com 1194 udp
remote vpnserver.abcde.com 444 tcp
reneg-sec 604800
在:
remote vpnserver.abcde.com
port 1194
protocol udp
remote vpnserver.abcde.com
port 444
protocol tcp
的值reneg-sec
也可能太高。
答案3
以下链接解决了我的所有错误
https://protonvpn.com/support/linux-openvpn/
基本上,它建议您也安装 resolvconf
sudo apt install resolvconf