Servidores virtuales | Compare Mobile Phones | Credit Counseling | Credit Cards UK | Credit Cards
Linux PPTP VPN Connection Help [Archive] - ZGeek

PDA

View Full Version : Linux PPTP VPN Connection Help


moonbuggy
31-03-2006, 01:46 PM
I'm a bit confused and not quite sure what I'm doing with this, and hopefully someone can help me.

I've got a VPN connection to the Windows 2003 domain at uni. It all works well when I use my XP box to connect, and it _almost_ works well when I connect via my linux [Fedora Core 5] box, but I can't figure out how to make it open the tunnel at boot.

For the purposes of this post, we'll call the connection "UNIVPN".

I've set up the tunnel with pptpconfig (http://pptpclient.sourceforge.net/) and it works perfectly when I use the GUI to connect. It sets up the routes and ipchains [I'm forwarding all traffic from my LAN to the uni's two B class subnets through the tunnel] and has created the appropriate chap- and pap-secrets files as well as the /etc/ppp/peers/UNIVPN file which looks something like this:

# tunnel UNIVPN, written by pptpconfig $Revision: 1.6 $

# name of tunnel, used to select lines in secrets files
remotename UNIVPN

# name of tunnel, used to name /var/run pid file
linkname UNIVPN

# name of tunnel, passed to ip-up scripts
ipparam UNIVPN

# data stream for pppd to use
pty "pptp <server address, which I'm not going to tell you> --nolaunchpppd "

# domain and username, used to select lines in secrets files
name <username, which I'm not going to tell you>

require-mppe
refuse-eap
debug dump

# do not require the server to authenticate to our client
noauth

# adopt defaults from the pptp-linux package
file /etc/ppp/options.pptp

# end of tunnel file

I can open the connection manually with "pppd call UNIVPN" from the shell. When I do it this way it connects properly but doesn't setup the routes or the ipchains properly, and I'm not sure why. But that's not my main concern at the moment since I can setup static routes and such later. [Although, if someone can give me some advice on why this doesn't work from the shell as it does from the GUI, I won't complain. :)]

What is most important to me atm is getting the VPN to start automatically when the machine boots up. I've made /etc/sysconfig/network-scripts/ifcfg-univpn and it looks like this:

# UNIVPN PPTP Tunnel
DEVICE=ppp0
ONBOOT=yes
DEFAULTROUTE=no
PROVIDER=UNIVPN
USERCTL=yes
DEBUG=yes


Yet, when I try "ifup univpn" all I get is:

Failed to activate univpn with error 1

I've vaguely been trying to do what various people have recommended [here (http://mirror.hamakor.org.il/archives/linux-il/12-2003/7286.html), for example], adapting it to my own needs. Nothing I try seems to make it go tho. :(

Can anyone tell me what I need to do to make this thing work?

The only other thing I can think of is to start pptpconfig via an init.d script and get it to export the GUI to a null display or something, but I don't really know how to do that anyways [vaguely makes it sounds like I know what I'm doing, maybe :)] and it seems like a messy way to go about things.

moonbuggy
31-03-2006, 06:27 PM
Okay, so I'm an idiot.

Hooray for wasting several hours because of a typo. :)

DEFROUTE is not equal to DEFAULTROUTE. [sigh]

Now I just need to figure out how to do the IP forwarding and routing nicely, but that shouldn't be too hard. :)