LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-27-2012, 08:16 PM   #1
basscatsmith
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
pptp routing issue Slackware64 13.37


I've been running Slackware for many years now but I've never had to deal with routing before. Unfortunately the university that I am attending has decided that in order to use their wireless net everyone must access it through a vpn. And of course they use pptp. While I have been using their vpn to login and use the school's engineering servers for months I am just now trying to use the on campus wireless with a new laptop.

I installed the slackbuilds.org pptp package. Setup the pppd and pptp configurations and everything seems to connect but nothing goes through. On my desktop at home all I needed was to put the following into ip-up in order to get rdesktop to connect to the school servers.
Code:
/sbin/ip route add default dev ppp0
I can't connect to anything else while pptp is running but it works for what I need it to do. On the laptop I can use rdesktop but I need to have all net traffic go through the vpn connection while I am on campus and I can't figure it out.

I did try the generic suggestions on pptpclient.sourceforge.net/ for routing but they don't work ether.

What my end goal is this: to get on campus, connect to one of their access points with wpa_gui, start up pptp to use their net without having a messed up routing table so I can leave and connect at a local coffee shop without hassle. Can anyone help me with this?

Thanks a lot in advance.
 
Old 03-28-2012, 06:15 PM   #2
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Rep: Reputation: Disabled
Since you didnt post the routing table once you are connected to vpn ill assume that vpn interface is tun0.

ill assume that ppp0 is interface that have direct access to the internet.

so theres a few way you can do it:

1. you should know the public IP (internet ip) of the vpn that you are connecting to.
ill assume that your default route is right now :

Code:
/sbin/route add default dev ppp0
then you do

Code:
/sbin/route add -host (ip of vpn) dev ppp0
/sbin/route del default dev ppp0
/sbin/route add default dev tun0
then by executing
Code:
traceroute www.google.com
you can see that the net traffic will go now through vpn. it will show gateway ip of vpn.

now lets say that gateway of vpn is 10.10.0.1
2. slightly better way would be to define routing like this:

Code:
route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.10.0.1 dev tun0
route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.10.0.1 dev tun0
/sbin/route add -host (ip of vpn) dev ppp0
Now first way is good if you really want to test how good is connection between you and vpn ex how long will vpn connection lasts. and when connection drops you will not have access to the internet unless you remove newly created route for vpn and make default route to be ppp0 if ppp0 is of course your default interface that have access to the internet.

and Second way is better because you dont have to remove the old route which is now ppp0 but because its greatly defined it takes precedence over current default route and if vpn connection drops, or you disconnect from the vpn you will still have access to the internet, because your old route which is ppp0 will remain intact.

Last edited by matters; 03-28-2012 at 07:01 PM.
 
Old 03-28-2012, 08:32 PM   #3
basscatsmith
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for the suggestions, Matters.

I will have to modify your suggestions slightly though as the vpn is not going through tun0 but ppp0 and the laptop is connecting to the general network though wlan0. When I am back on campus tomorrow I will try them. I will also copy the routing table that is originally produced and what is made through your suggestions and post them.
 
Old 03-29-2012, 08:50 AM   #4
basscatsmith
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
So here are the routing tables from on campus.

Initial connection to an access point:
Code:
default  192.168.208.1  0.0.0.0  wlan0
192.168.208.0  *  255.255.040.0  wlan0
After starting pptp with pppd and not using a ip-up script:
Code:
default  192.168.208.1  0.0.0.0  wlan0
134.88.248.1  *  255.255.255.255  ppp0
134.88.252.20  192.268.208.1  255.255.255.255  wlan0
192.168.208.0  *  255.255.240.0  wlan0
134.88.252.20 is the address that is used to log into the vpn. The local address given by the vpn is 134.88.249.* and 134.88.248.1 is the remote address. Removing the wlan0 default and setting up a default with 134.88.252.20 or 134.88.248.1 as the gateway or no gateway does not work.

The second suggestion does not work as route keeps saying that the netmask does not make sense.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PPTP, Centos 5.5, Routing jamescondron Linux - Networking 8 04-24-2011 05:56 PM
How to Make PPTP routing jasem200 Linux - Networking 1 04-02-2010 01:04 PM
routing through pptp prashanlk Linux - Networking 1 11-26-2007 07:00 PM
PPTP local routing tmchardy Linux - Networking 3 03-07-2006 04:13 PM
pptp server/client settings & routing issue csvke Linux - Networking 0 01-27-2004 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration