Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Converting Cisco Easy VPN .pcf files to Linux vpnc configuration format

  1. Home

By Khalid on 2010/08/20 - 00:21, last updated 2010/09/21 - 11:34

Since I use Linux exclusively, and have to interface with clients using various Windows technologies, open standards are an important aspect of our tech-life. For example, we use OpenOffice to read Word/Excel/Powerpoint files, and so on.

One thing that comes infrequently is the need to login to a corporate virtual private network (VPN) that uses Cisco's Easy VPN.

The client would send me a .pcf, and since I use Linux and prefer the command line, I have to convert it into vpnc's format.

We found that the easiest way is programmatic, but involves a few steps of preparation.

The steps below assume that you are running Ubuntu 8.04 LTS, but should work pretty much the same for any Debian derived distro. Other distros differ only in the the vpnc configuration path, and the way you install the dependencies needed.

First, we get the pcf2vpnc converter program. This is a perl script.

# 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/

The above script calls a decrypt program for the group password in the .pcf file. Therefore we need to get the program and compile it. This also involves installing some dependencies for it as well.

# Get the cisco decrypt program
wget http://www.unix-ag.uni-kl.de/~massar/soft/cisco-decrypt.c
# Get the dependencies needed for it
sudo aptitude install libgcrypt-dev libgpg-error-dev
# Compile it into a binary
gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags)
# Move it to a place in our path
sudo mv cisco-decrypt /usr/local/bin

We are now ready to run the script against the .pcf file, and save it to a .conf file

# Run the converter, which will call the decrypt program
pcf2vpnc Client.pcf > client.conf

We then copy the converted configuration file to vpnc's configuration directory:

sudo cp client.conf /etc/vpnc

And finally, we test the configuration file by logging to the VPN:

sudo vpnc client

Further reading

  • Avoid Cisco - Linux vpnc
  • Ubuntu Linux VPN connection without Cisco VPN client
  • Online cisco decode page
  • Gentoo's vpnc HOWTO
Contents: 
Linux
Tags: 
Ubuntu
vpnc
Cisco
VPN
pcf2vpnc
cisco-decrypt
  • Add comment

Comments

Pablo Estigarribia (not verified)

Thanks a lot

Wed, 2010/09/08 - 13:14

Many thanks to you, it worked on the rocks in Ubuntu 10.04 !

Just note:
sudo aptitude install libgcrypt-dev libgpg-error-dev

(sudo missing before)

  • reply

Gil (not verified)

I am linux newbie, but I

Tue, 2010/09/21 - 11:29

I am linux newbie, but I managed to get the VPN connection working by following your excellent intructions. How do I disconnect from the VPN once I am finished using it?

  • reply

Khalid

Disconnecting

Tue, 2010/09/21 - 11:32

To disconnect, use:

sudo vpnc-disconnect
  • reply

Gil (not verified)

Thanks for you quick answer

Tue, 2010/09/21 - 12:55

Thanks for you quick answer

  • reply

Ronald Portier (not verified)

Error while decoding

Mon, 2010/10/04 - 04:40

Hello,

Not working fully for me on Debian Squeeze.

When I run the command I get a partial .conf file. However the encrypted secret has correctly been decrypted and has been placed in the IPSec secret line. Then I get an errormessage, and the conversion is incomplete.

This is a dump of what I did:

# pcf2vpnc client.pcf > client.conf
decoding input: No such file or directory

Any ideas??

A solution would me much appreciated. Would like just to use the opensource solution.

Kind regards,
Ronald

  • reply

Anonymous (not verified)

solution for Debian Squeeze

Sun, 2011/01/09 - 20:16

I had the same issue on squeeze... but the solution is simple.

"#pcf2vpnc client.pcf"

The script will produce a file of the same name but as client.conf.

This solution worked great on Debian Squeeze for me.

  • reply

Anonymous (not verified)

great

Mon, 2011/02/28 - 15:42

working for me too! many thanks
it gave me error: decoding input: No such file or directory
but job was done on debian squeeze
great!

  • reply

vijay dafal (not verified)

All instructions worked even provided by other suggestions!

Sun, 2011/03/20 - 11:16

it worked for me on Ubuntu 10.10!

  • reply

wjmmx (not verified)

Great job!

Fri, 2011/05/13 - 01:14

Works for me on Ubuntu 10.10!

  • reply

Anonymous (not verified)

Thanks a lot ! Really!

Wed, 2011/10/19 - 13:11

Thanks a lot ! Really!

  • reply

Pages

  • 1
  • 2
  • next ›
  • last »

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.