- Joined
- Aug 6, 2008
- Messages
- 14
- Reaction score
- 0
If you want to establish a virtual private network (VPN) with an organization such as your university AND want to use the free vpnc instead of Cisco's vpnc client AND your organization uses SSL encryption, this is the right How-to for you. The problem with the standard version of vpnc is a missing support for OpenSSL, which happens due to an incompability of the OpenSSL license with GPL. Nevertheless, you can recompile vpnc on your Acer Aspire One with OpenSSL support built in without any problem.
This How-to guide assumes you know how to run a terminal, edit files with a texteditor and install packages. Probably you also activated the Advanced Mode already.
First you will need to download the vpnc source code from the project's homepage. Save the tar.gz file somewhere in your home direcory. Open a terminal and change to that directory. Let's unpack everything:
Next, we need to include the support for ssl in the code. Change to the unpacked directory
and edit the Makefile:
In case you don't like Vim editor as much as I do, you can use something like
.
Go to lines 49 and 50 and uncomment them by removing the hash (#). They should look like this afterwards:
Save your changes and quit the editor. Now you will need to install quite a bit of software and libraries for building from source code, unless you have set up a development environment already. You can install all the following packages from command-line with
Alernatively you can use:
You need a basic development environment in order to compile, in case you did not install one already, I suggest using
(including quotation marks). On top of that I needed to install the packages kernel-devel - 2.6.23.1-42.fc8.i686 , libgcrypt-devel - 1.2.4-6.i386 (with lots of dependencies) and openssl-devel - 0.9.8b-17.fc8.i386.
In case you need to find out your installed kernel version in order to pick the right package, try
The list of packages mentioned above might be incomplete. If the following compilation doesn't work on your computer, it is probably tributed to the fact that I didn't resolve all dependencies correctly. But as I had many development packages installed already, the following build command worked on my machine:
As a next step, you need to obtain the certificate from your VPN. In my case this is University of Karlsruhe and I downloaded the cert from their page (you have to enter "dfnpem" in the smart-link box at the bottom right of the page in case you want to connect to University of Karlsruhe too). You have to copy the file to the apropriate folder, which is on Linpus Linux:
Then we need to edit the vpnc configuration file:
The contents of the file looks like this, please modify to your needs:
Please note that the "obfuscated secret" and the following long number has to be a single line. You can protect your configuration file, as it contains a password in clear text, with
Unfortunately we're not done yet. Before we can start vpnc we need to add the tun/tap kernel module. How this is done is described in another how-to guide of the same forum. Please follow the instructions there. You need to insert the kernel module via
In case you want to load the tun module at boot time, edit the file
and add the line
Now we're ready to go! You should be able to start your VPN with
and disconnect again with
Please let me know, if it works for you. I hope I didn't mess up anything, because this has become rather long here.
This How-to guide assumes you know how to run a terminal, edit files with a texteditor and install packages. Probably you also activated the Advanced Mode already.
First you will need to download the vpnc source code from the project's homepage. Save the tar.gz file somewhere in your home direcory. Open a terminal and change to that directory. Let's unpack everything:
Code:
tar -xzf vpnc-0.5.1.tar.gz
Next, we need to include the support for ssl in the code. Change to the unpacked directory
Code:
cd vpnc-0.5.1
Code:
vim Makefile
Code:
mousepad Makefile
Go to lines 49 and 50 and uncomment them by removing the hash (#). They should look like this afterwards:
Code:
OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION
OPENSSLLIBS = -lcrypto
Code:
sudo yum install name-of-package
Code:
pirut &
Code:
sudo yum groupinstall "Development Tools" "Legacy Software Development"
In case you need to find out your installed kernel version in order to pick the right package, try
Code:
uname -r
Code:
make && sudo make install
Code:
sudo cp /mnt/home/Downloads/dfnpca-02.pem /etc/pki/tls/certs/
Code:
vim /etc/vpnc/default.conf
Code:
IPSec gateway vpn.uni-karlsruhe.de
IPSec ID vpn
IPSec obfuscated secret ABED22A5C87C97A1A46DCF3B7318FF31A3DCF07E1714F1F0A62DA51456D94BD62FCC576D465E24FD55463E2E5E673BA8
IKE Authmode hybrid
Xauth username your-user-name-goes-here
Xauth password your-password-here
CA-File /etc/pki/tls/certs/dfnpca-02.pem
Code:
sudo chmod 600 /etc/vpnc/default.conf
Code:
sudo modprobe tun
Code:
vim /etc/rc.local
Code:
modprobe tun
Code:
sudo /usr/local/sbin/vpnc
Code:
sudo /usr/local/sbin/vpnc-disconnect