Saturday, November 1, 2008

强大好玩滴VPN!

接着上次的说。总是听说VPN(Virtual Private Network 虚拟私人网络),但是一直都没有尝试。直到昨日在solrex的博客上看到了此文,兴致大增——居然还有免费的VPN服务!于是搬出google搜索,发现了另外一个更佳的VPN服务,Relakks.

Solrex介绍的香港Prairie Dog VPN服务对于免费用户滴限制挺多,具体可参看他们的FAQ,摘录如下:
Free account will be disconnected automatically once the download exceeds 30M or upload exceeds 15M, even though users may reconnect again.
This limitation is to discourage users from hogging the bandwidth. They should move to paid account instead.
There is no limit on the number of concurrent users on the free account server. As a result, a free account user is more likely to experience network congestion, including inability to connect to the VPN server and slow connection.
VIP/Premium/Paid account do not have such limitation. We will also limit the number of VIP accounts hosted per VPN server to ensure there is adequate network bandwidth for each VIP account user.

简单点说就是每次连接之后的通信流量有限(下载30M 上传15M),但是你可以reconnect重新连接;免费用户相比付费用户而言,速度更慢(因为双方服务器的待遇大不相同)。

而Relakks就好得多。流量上任你用,待遇也一样,不过有一点不同,就是每个注册用户只能用30天。(画外音——这还不简单,注册多个用户不就得了?回答——不行,他们是根据网卡的物理地址MAC来定位每个注册用户的。画外音——那就换一个MAC不就行了?回答——有违法律内容咯,这里就不说了,大家有兴趣自己研究.)

Relakks上有如何在WindowsXP下配置VPN的说明,也有针对Vista和Apple Mac的,就是没有Linux的! :(

不过没有也无所谓啦,自己动手,丰衣足食嘛。Solrex的文章其实已经说得挺清楚的了,不出意外的话,配置起来应该没啥问题。可偏偏俺多灾多难的系统就有问题——压根找不到VPN的选项。按道理,安装如下软件后(sudo apt-get install pptp-linux network-manager-pptp network-manager-vpnc)就应该可以在nm-applet(网络管理插件)上找到VPN配置的选项,可是估计还是俺升级不规范的原因,怎么都找不到。

在Preferences - Main Menu - Applications - Internet下找到两个控制台软件——



也就是刚才安装的network-manager-pptp和network-manager-vpnc了,尝试着运行,却提示找不到nm-vpn-properties,google后发现这nm-vpn-properties还真是挺怪!首先是搜索之后,发现大家对此小东西是叫苦不迭,看得我心中真是深感安慰(瓦哈哈哈,大家居然都是苦难人啊 囧)!最后终于在这里找到了问题所在,摘录这位Debian开发者的一段话——
On Mon, 01 Sep 2008 12:30:19 +0200, Michael Biebl <...@debian.org

No, you are right, the network-manager package has no GNOME dependencies
although it ships nm-vpn-properties, a GNOME application.


This is actually a bit of a hack.
The monolithic NetworkManager source tarball was split into a core part
and GUI/GNOME part in version 0.6.5. Unfortunately nm-vpn-properties
remained in the core network-manager package.

We had the option to split nm-vpn-properties into yet another package,
make the network-manager binary package depend on GNOME libs, or cheat a
little and exclude the GNOME dependencies from network-manager.

We chose the last option. We assumed, that anyone using
nm-vpn-properties will also use nm-applet from network-manager-gnome,
which will pull in all the necessary dependencies.
Another reason was, that in the upcoming 0.7 release, nm-vpn-properties
will be dropped from the network-manager core package, so a separate
binary package seemed like a bit of overkill.

And making the network-manager binary depend on GNOME libs was also not
an option, given that it is used by KDE only desktops.

Hope this clarifies the situation a bit.

Cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth? (这段签名很有意思 :D )

可见,由于nm-vpn-properties的在多个版本中依赖关系的不确定性,导致俺机器上压根没了这小东西。所以nm-applet就没法检测出VPN配置的存在了。
-------------------------------------------

So,怎么解决?推荐kvpnc!这个KDE下的基于Qt library的软件,功能异常丰富,可谓豪华级别的配置!安装就不说了,大家apt-get install自己搞定。这里就说一说配置Relakks的VPN服务时要注意的问题——

1. 协议要选择M$的PPTP点对点通信协议。

2.在PPTP的设置页面上,切记务必做出如下设置——(具体信息参考 /etc/ppp/options.pptp 文件或者是 man pptp 查阅


3. 网络设置上,做出如下设置——(不要自定义MTU,同时网络设备选择default,ADSL用户一般会自动选择到宽带链接,如ppp0)


4. 服务器选择 pptp.relakks.com

连接就OK咯。你将会使用來自瑞典的VPN服务,通过瑞典的IP,穿越伟大的“超大”防火墙访问internet! :D

ps. 如果你不想安装kvpnc,想直接通过命令行连接,那也是可以的。因为毕竟kvpnc只是帮助你配置了一下pon的文件和chap-secrets中的用户和密码罢了,而pptp的设置在options.pptp中可以方便设置。只是这里就不罗嗦了。大家自己研究探索啦! :)

-- jtuki

2 comments:

  1. [...] 还是接着上次的说。对于我等广大滴ADSL用户来说,在linux下只需要运行pppoeconf便可配置ADSL用户名密码等来上网了。但是有时候遇到更加advanced滴事情,例如配置VPN,就需要network-manager-gnome来帮帮忙了。毕竟,对于网络配置而言,在图形界面下配置比在命令行下配置要更加令人愉悦。 [...]

    ReplyDelete
  2. [...] 以前在blog里写过一则《强大好玩滴VPN》,不料今天用这个VPN服务上网居然有了一个非常令人欣喜的发现——來自google的searchwiki!具体的截图看这里(点击图片进入 picassa_web_albums 查看更多)—— [...]

    ReplyDelete