Cisco VPN Client for linux 安装与使用(IPsec)

作者: 魏延是反贼. 分类: Linux, 系统·安全·调优

Cisco一直有一个比较好的Windows客户端去拨VPN,比如我现在用的“Cisco Systems VPN Client Version 5.0.07.0290” ,但是他却一直没有出一个官方的比较合理的linux客户端。这可真让人发愁,之前我们在Linux上一直用的是vpnc这个软件,软件用起来小巧易用,配置方便,但是问题是最近用着越发的不稳定了……动不动就断一次,这让正传输文件的我们很是头疼。于是开始找,有没有和windows上的VPN client一样好用的linux版~~终于~~网友们还是写出了适用于linux的VPN client。

VPN Client For Linux !
官网:http://projects.tuxx-home.at/?id=cisco_vpn_client
软件下载地址: http://projects.tuxx-home.at/ciscovpn/clients/
patch下载地址:http://projects.tuxx-home.at/ciscovpn/patches/

 

下面就是简单易用的安装方法:
装软件之前必须要知道你的内核是什么版本的,我这里是2.6.18.194,如果你之前没有装过kernel的开发包的话,那么是时候需要升级一下你的kernel了(安装了kernel-devel的不需要做下面的操作)
yum -y install kernel kernel-devel

下载vpn client
cd /usr/local/src
wget http://projects.tuxx-home.at/ciscovpn/clients/linux/4.8.02/vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
tar zxvf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
cd vpncliet

此时,根据你内核的版本,来决定是否需要打补丁~毕竟这个软件是非官方的,对于2.6.24以上的内核不是很支持~(打补丁的方法见最后)
———————————————–
如果你和我一样内核版本较低,不需要打补丁,则可以直接运行安装
./vpn_install

安装开始会让你设置各项参数,之后安装结束,这里需要注意的是它将会读取你内核开发组件的路径,你要确保路径正确。
Directory where binaries will be installed [/usr/local/bin]
#
Automatically start the VPN service at boot time [yes]
#
In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.
#
For RedHat 6.x users these files are installed in /usr/src/linux by default
For RedHat 7.x users these files are installed in /usr/src/linux-2.4 by default
For Suse 7.3 users these files are installed in /usr/src/linux-2.4.10.SuSE by default
#
Directory containing linux kernel source code []/usr/src/kernels/2.6.18-194.11.3.el5-i686
#
* Binaries will be installed in “/usr/local/bin”.
* Modules will be installed in “/lib/modules/2.6.18-194.11.3.el5/CiscoVPN”.
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from “/usr/src/kernels/2.6.18-348.4.1.el5-i686” will be used to build the module.
#
Is the above correct [y]

当一切安装结束之后:
连接VPN的配置都在/etc/opt/cisco-vpnclient/Profiles中,里面默认已经有一个叫做simple.pcf的模板文件,不过我们基本用不上。
在其中加入一个新的配置 XXX.pcf (名字随意,主要是为了好识别这个vpn配置文件是连接哪的)。
配置文件的内容参考使用win版VPN client连接之后,安装目录中Profiles内的pcf文件,直接复制即可

启动vpnclient服务
/etc/init.d/vpnclient_init start

拨通vpn (XXX为Profile目录下的自己定义的名字)
nohup vpnclient connect XXX > /dev/null &

后续,打补丁的方法:
下载你需要的patch,然后进入解压后的目录,打补丁,安装。
wget -q http://projects.tuxx-home.at/ciscovpn/patches/vpnclient-linux-2.6.24-final.diff
cd vpnclient
patch <../vpnclient-linux-2.6.24-final.diff
patching file GenDefs.h
patching file interceptor.c
./vpn_install

标签:,

返回正文

(1)条评论

  • Seahurt

    |

    这个软件还是官方的吧,只是这个补丁是大神给弄的,但是现在内核都到了3.0了,所以还是用不了。。。

    回复

您的留言是我最大的支持!