Blog Forum Wiki Links Contact Us
 
Translations of this page:

Virtual Private Networking

Many of us like to take our EeePC's on the go, and what better way to stay in touch with your office than with their own VPN software?

Here's a few methods that have worked well for us.

Cisco VPN

Use the vpnc package from the Debian repositories forum link

  sudo apt-get install vpnc
  • note that you might run into DNS resolver issues because vpnc mucks with /etc/resolv.conf. Make a copy of your /etc/resolv.conf first until a workaround is found.Doenst seems to with the option DNSUpdate no — [tweepy] 2008/01/28 14:56

Create/edit a profile file under /etc/vpnc/

  sudo kwrite /etc/vpnc/vpn-connection.conf

And paste and fill the blank with this:

IPSec gateway xx.xx.xx.xx
IPSec ID XXXX
IPSec secret XXXX
Xauth username XXXX
Xauth password XXXX
DNSUpdate no

If there is a pcf file (cisco vpn config file)

You can also convert a ciscovpn profile to a vpnc config file by using this script http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc.

download it by

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

make it executable by

  chmod +x pcf2vpnc

run it by

  ./pcf2vpnc <pcf file> [vpnc file]

now you should copy this file to /etc/vpnc

For Advance Desktop mode/KDE lets create a script in order to make the connection easier.

  sudo kwrite /etc/vpnc/vpn

#!/bin/sh
vpn_running=$(ps xa | grep -v grep | grep vpnc-connect | awk '{print $1}')
if test $vpn_running > 0
then
kdesu -c /usr/sbin/vpnc-disconnect
kdialog –title “VPNC status:” –passivepopup “VPN Connection has been stopped!” 5
else
vpns=$(kdesu -c /bin/ls /etc/vpnc/|grep \.conf|/usr/bin/cut -d / -f 4|/usr/bin/cut -d . -f 1)
let count=$(echo $vpns| wc -w)
if [ “$count” -gt 1 ];
then
vpn=$(kdialog –combobox 'Choose the vpn connection to establish' $vpns)
else
kdialog –msgbox $vpns
vpn=$vpns
fi
if test ${#vpn} -gt 0
then
kdialog –title 'VPNC status:' –passivepopup “`kdesu -c
/usr/sbin/vpnc-connect$vpn.conf`” 5
else
kdialog –title 'VPNC status:' –passivepopup “Cancelled by user”
fi
fi

To make it executable:

  sudo chmod +x /etc/vpnc/vpn

Finally, create a shortcut on your desktop to start the command:

  kdesu /etc/vpnc/vpn

For GUI based vpnc script please refer to: http://wiki.eeeuser.com/vpnc_gui

OpenVPN

This package is available in the xnv4.xandros.com repository forum link

  sudo apt-get install openvpn
  • check that /dev/net/tun exists - apparently it doesn't by default. Skip this step if it already exists (won't hurt if you run the command again). Note that I think you need this step even if you are using tap instead of tun.
  sudo mkdir /dev/net
  sudo mknod /dev/net/tun c 10 200
  • you should be able to use openvpn now. To test, you can use this command:
  sudo openvpn --verb 9 --config /etc/openvpn/your_config.conf

More complete instructions on how to set up both the client and the server side of OpenVPN are listed at OpenVPN Setup.

Connect to Windows VPN Server

For Microsoft Windows VPN servers that employ PPTP - and not IPSec - such as many corporations do.

This is done by using the built-in VPN (ppp + pptp) client.

  1. Run the Create Connection Wizard, select Virtaul Private Network - PPTP VPN
  2. Follow the wizard, fill in server address (WINS Server if you need one)
  3. In User Name, enter in your credentials in this format: username@domain.whatever
  4. On next page, name the connection as you wish - that will only be an alias
  5. Enter the Properties for the new connection, and on the General page, make note of the ID (should be vpnX)

Now you have a connection ready to go, but because Microsoft's VPN service doesn't respond in a manner that the VPN client can understand which protocol to use (in my case, MS-CHAPv2). So we have to manually edit the configuration files for this connection.

Note: If you are using UnionFS (the default installation) then you don't really have to worry about backing up files - I make a point of doing so anyways. It's safer that way.

  sudo kwrite /etc/ppp/peers/vpn1   # replace vpn1 with your own vpn

Under the line that reads require-mppe, add this line:

  require-mschap-v2

Add this line to the end of the file:

  refuse-eap

You may have to tweak the protocols to match your company's VPN protocols - but this should now work.

I have also commented out the lcp-echo-interval 30 directive from /etc/ppp/options - to prevent an auto-timeout on the connection. rio sosh code rio

 
howto/vpn.txt · Last modified: 2012/01/27 19:18 by hello
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki