Sunday, May 02, 2010

Compile vpnc with openssl in Ubuntu

1. Compile vpnc with openssl and build package
  • Download vpnc source
sudo apt-get source vpnc

  • Uncomment some lines from Makefile. One of these two set of lines would be present in Makefile uncomment whichever is present.
OPENSSLLIBS = -lcrypto

  • Build vpnc dependencies
sudo apt-get build-dep vpnc

  • Install openssl
sudo apt-get install openssl

  • Install libssl dev packages
sudo apt-get install libssl-dev

  • Build vpnc package
sudo dpkg-buildpackage

2. Create a vpnc conf file
#Generated by pcf2vpnc
IPSec ID GeneralHybrid
IPSec gateway <server>
IPSec secret <sercret>
Xauth username <username>
IKE Authmode hybrid
CA-File <path_to_certificate_file>.pem

#Xauth password 123456
#IKE DH Group dh2
#To add your username and password, use the following lines:
#Xauth password <your password>

3. Install network manager vpnc with openssl support