You are not logged in.

#1 2010-09-15 16:46:55

kYd
Member
Registered: 2009-01-20
Posts: 78

Connect to VPN from CLI

Hi,

I've bought a VPN subscription to encrypt my traffic in my student accommodation, but as I use WICD network manager there is no built in support for connecting to a VPN so it is all command line.

At the moment from reading different sources, the way I connect is as follow:

pppd call MYVPN
route add default ppp0

It works, however I'm not sure if this is the ideal way to establish the connection, and I'm still a bit paranoid that not everything will be going through the VPN interface (ppp0), as I do not have much experience with the route command.

Is what I am doing correct?
Thank you.

Offline

#2 2010-10-08 04:15:15

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: Connect to VPN from CLI

No experience with exactly that... but I use vpnc to connect to my work VPN. You might look into that? I use the version modified to allow for Nortel Contivity functionality, but with a simple config file, you edit the settings and then just have to run:

sudo /usr/local/sbin/vpnc

and you're done. I built mine from source and put it in /usr/local/sbin. Arch has the vpnc package and might put it in /usr/bin instead.

You might check it out

sudo pacman -S vpnc

Then google around for appropriate config settings. You should be able to verify it's working with something like http://www.whatismyip.com/ (or ifconfig...).

When you're done, just do:

sudo /usr/local/sbin/vpnc-disconnect

Offline

#3 2010-10-08 04:27:27

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Connect to VPN from CLI

I used to use vpnc. It comes with a daemon script so it's as easy as

# /etc/rc.d/vpnc start

And it will use the default script /etc/vpnc/default.conf
If you want to specify a script then you need to run vpnc-connect as root and specify the script in the first argument.


neutral

Offline

Board footer

Powered by FluxBB