设置 VPN 客户端

ump*_*sky 10 network-manager vpn openvpn

我需要从我的 Ubuntu 12.04 访问 VPN。

我看到网络管理器中有 VPN 连接 > 配置 VPN,但它要求输入用户名和密码。

我所拥有的只是一些.crt, .csr, .key,.ovpn文件,它们适用于某些 Windows 客户端。

我真的是 VPN 新手。

我也找到了这篇博文。这是一条路吗?

小智 14

这是我为使其工作而遵循的程序。网络管理器中存在一个错误,它无法正确执行 ovpn 导入 - 自 2010 年(!)

https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365

在修复之前,我找到了这个网站

http://howto.praqma.net/ubuntu/vpn/openvpn-access-server-client-on-ubuntu

程序

Create a new folder in your home dir - I called mine vpn.config
Copy your downloaded client.ovpn file into the new folder

Open client.opvn in an editor

Open a new file
Cut the lines between <ca> tags in client.ovpn
Paste into new file, save this file as ca.crt
Remove both <ca> tags from client.ovpn

Open a new file
Cut the lines between <cert> tags in client.ovpn
Paste into new file, save this file as client.crt
Remove both <cert> tags from client.ovpn

Open a new file
Cut the lines between <key> tags in client.ovpn
Paste into new file, save this file as client.key
Remove both <key> tags from client.ovpn

Open a new file - this is the last one :-)
Cut the lines between <tls-auth> tags in client.ovpn
Paste into new file, save this file as ta.key
Remove both <tls-auth> tags from client.ovpn

And remove this line:
key-direction 1


Now position the cursor in client.ovpn, right above the line # -----BEGIN RSA SIGNATURE-----

Insert the following lines

ca ca.crt
cert client.crt
key client.key
tls-auth ta.key 1

Save and close all the files.

Goto Network Manager -> Edit Connections ->VPN
click Import, browse to the modified client.ovpn in the folder you recently created - and where your certificates are, and import that file
Enter vpn username and password if prompted
On the VPN page, select Advanced
On the General Tab, uncheck the first option, "Use custom gateway"

Save

Use...
Run Code Online (Sandbox Code Playgroud)


Sim*_*n B 13

network-manager-openvpn-gnome从 Ubuntu 软件中心安装(通常在搜索 openvpn 时会从搜索结果中隐藏,除非您单击窗口底部的“显示 XX 技术项目”)。

或者可以使用终端(Ctrl+ Alt+ T):

sudo aptitude install network-manager-openvpn-gnome
Run Code Online (Sandbox Code Playgroud)

在此之后,连接到 openvpn VPN 的选项将出现在

网络管理器 -> vpn 连接 -> 配置 vpn

  • @umpirsky 根据此线程 http://ubuntuforums.org/showthread.php?t=1337460; 从菜单中选择配置 VPN &gt; 选择您遇到问题的 VPN &gt; 单击编辑 &gt; 单击 IPv4 选项卡 &gt; 单击路由 &gt; 选中“仅将此连接用于其网络上的资源”框。 (4认同)
  • 将所有这些文件保存在同一文件夹中,然后当您打开设置时,应该有一个“导入”选项,您可以在此处打开 .ovpn 文件。大多数(如果不是所有)设置都应该为您设置,具体取决于 .ovpn 文件的创建方式。除非您熟悉命令行,或者有特殊需要,否则使用网络管理器要容易得多。*注意* 我不知道他们是否改变了这一点,但您过去必须注销/重新登录或重新启动,才能在创建后显示新的 VPN 连接。 (3认同)
  • 唯一的问题是我在激活 VPN 时没有互联网连接 :) 知道为什么会发生这种情况吗? (2认同)