Cisco VPN on CentOS 6

Install eplel repo


# rpm -ivh http://mirror.vcu.edu/pub/gnu+linux/epel/6/i386/epel-release-6-8.noarch.rpm


# yum -y install vpnc
# chmod 700 /etc/vpnc/vpnc-script
# cp /etc/vpnc/default.conf /etc/vpnc/default.conf.orig

Save your .pnc file from Networking to /etc/vpnc/ folder

Install the VPN .pnc file as a default.conf file

Get the pcf to vpnc configuration file converter


# wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc

Make it executable


# chmod +x pcf2vpnc

Move it to a place in our path


# mv pcf2vpnc /usr/local/bin/


# cd /etc
# pcf2vpnc /path/username.pcf default.conf
# chown root:root default.conf
# chmod 600 default.conf

Edit the config file to either use your username and password, or to manually enter


# nano default.conf
# Uncomment for auto login
# Xauth username myusername
# Xauth password userpass
# Uncomment for manual login
Xauth interactive

Backup resolv.conf

As a final configuration step, it is a good idea to make a backup of your resolv.conf file. The vpnc program will replace the resolv.conf upon connection and will restore it when you disconnect.

Connect and Disconnect

You must be logged in as Root for this to work

# vpnc
# vpnc-disconnect

Leave a Comment