CISCO VPN client for Linux

[ 한글 中文 english ]

職場のLANにVPNでつなぐには、CISCO の VPNクライアントと RSA の SecurID が必要。職場では、Windows クライアントしか供給されていないのだが、自宅では MacOS と Fedora Linux を使っている。先週Macでの接続に成功。きょうは、残業なしで帰宅できたので、さっそくLinuxで試してみることに。
結論から言うと、現時点では、パッチが必要。

まず、kernel-develが必要。

# yum install kernel-devel -y

そして、VPNのソース(vpnclient-linux-4.8.00.0490-k9.tar.gz)をインストールする。たぶん、そのままでは、コンパイルできない。ソースは、自分で探してくださいな。

で、解凍。

# tar vpnclient-linux-4.8.00.0490-k9.tar.gz

つぎに、カーネルにあったパッチを適用。まずは、現在うごいているOSを確認。

# uname -a
Linux localhost.localdomain 2.6.22.1-41.fc7 #1 SMP Fri Jul 27 18:10:34 EDT 2007 i686 i686 i386 GNU/Linux

それでは、2.6.22ということなので、パッチをダウンロードして入れてみましょう。くれぐれも、バージョンを間違わんといてや。

# wget http://tuxx-home.at/projects/cisco-vpnclient/vpnclient-linux-2.6.22.diff
# patch -p0 < vpnclient-linux-2.6.22.diff
patching file IPSecDrvOS_linux.c
patching file frag.c
patching file interceptor.c
patching file linuxcniapi.c
# cd vpnclient
# ./vpn_install
Cisco Systems VPN Client Version 4.7.00 (0640) Linux Installer
Copyright (C) 1998-2005 Cisco Systems, Inc. All Rights Reserved.

By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with
its terms.

Directory where binaries will be installed [/usr/local/bin]

Automatically start the VPN service at boot time [yes]no

In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.

Directory containing linux kernel source code [/lib/modules/2.6.22.1-41.fc7/build]

これで無事にインストールできるはず。

あとは設定だけだが、設定がややこしいので、PCFファイルは、WindowやMacで作ったファイルをそのまま /etc/opt/cisco-vpnclient/Profiles/ にコピーすると簡単。

とりあえず、起動してみる。

# /etc/init.d/vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: Done

で、確認。

# /etc/init.d/vpnclient_init status
Module Size Used by
cisco_ipsec 549788 0
cipsec0 Link encap:Ethernet HWaddr 00:0B:FC:F8:01:8F
NOARP MTU:1356 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

デバイスは、できていますね。

では、接続。

[root@localhost cisco-vpnclient]# vpnclient connect AsiaPac
Cisco Systems VPN Client Version 4.8.00 (0490)
Copyright (C) 1998-2005 Cisco Systems, Inc. All Rights Reserved.
Client Type(s): Linux
Running on: Linux 2.6.22.1-41.fc7 #1 SMP Fri Jul 27 18:10:34 EDT 2007 i686
Config file directory: /etc/opt/cisco-vpnclient

Initializing the VPN connection.
Contacting the gateway at 58.XX.XX.XX
User Authentication for AsiaPac…
Enter Username and Password.
Username [伏せ字]:
Passcode []:
Authenticating user.
Negotiating security policies.
Securing communication channel.

Your VPN connection is secure.

VPN tunnel information.
Client address: 10.23.1.3
Server address: 58.XX.XX.XX
Encryption: 168-bit 3-DES
Authentication: HMAC-MD5
IP Compression: None
NAT passthrough is active on port UDP 10000
Local LAN Access is disabled

bash-3.2$ /sbin/ifconfig
cipsec0 Link encap:Ethernet HWaddr 00:0B:FC:F8:01:8F
inet addr:10.23.1.3 Mask:255.0.0.0
inet6 addr: fe80::20b:fcff:fef8:18f/64 Scope:Link
UP RUNNING NOARP MTU:1356 Metric:1
RX packets:0 errors:0 dropped:26 overruns:0 frame:0
TX packets:0 errors:0 dropped:22 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

よっしゃ、ええ感じ。大成功。

Leave a Reply


無料アクセス解析