May 5, 2013

Connect to a Cisco VPN via VPNC using .pcf configurations file

If you want to connect to a Cisco VPN from a Linux host, its better to use the Cisco AnyConnect VPN client for Linux. It is a free client tool but you need to login to the Cisco website.

VPNC is a free VPN client which is capable of connecting to Cisco VPNs (3000).

Use yum to install vpnc.

# yum install vpnc NetworkManager-vpnc vpnc-consoleuser -y

It will install all necessary packages. In the installation it create a default configurations file in the configurations directory. You need to backup that.

# mv  /etc/vpnc/default.conf  /etc/vpnc/default.conf.bak

Then you need to convert the .pcf file into a vpnc configurations file. To do that you need to run a script.

# perl   /usr/share/doc/vpnc-*/pcf2vpnc   your.pcf   /etc/vpnc/default.conf

After creating the configurations file you can try to connect to the VPN by;

# vpnc

It will ask for the user password;

# Enter password for youusername@your.vpn.server :

Give the password. If that succeed you can see a message like this.

# VPNC started in background (pid: 18957)

If you want to disconnect from the VPN, simply type ;

# vpnc-disconnect

Then it will try to disconnect your session from the VPN and will give a message like this.

# Terminating vpnc daemon (pid: 18957)

No comments:

Post a Comment

Your comments are always welcome ...