2

My purpose is to route all traffic through a pptp connection from a linux machine. (Windows does this automatically after connecting to a pptp server).

The command

pptpsetup --create TUNNEL --server [servhost] --username [user] --password [pass] --encrypt --start

gives:

Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
CHAP authentication succeeded
MPPE 128-bit stateless compression enabled
Cannot determine ethernet address for proxy ARP
local  IP address 10.55.0.8
remote IP address 10.55.0.1

This indicates a succesful connection. At this point I want to be able to route all my traffic through this new ppp0 interface, but I am not very familiar with routing. Tried to follow the guide about routing on the pptpclient homepage, but no success so far.

How can this be accomplished? What do I need to know? (This is a headless machine, thus I have no way to use graphical tools)

noname
  • 23
  • 1
  • 3

1 Answers1

3

As you noticed pptp uses ppp. Edit the appropriate configuration file and add/uncomment the line for defaultroute see: man pppd.

Another option suggested in this bug report that might work for you is to create a simple script.

#! /bin/sh
#filename: /etc/ppp/ip-up.d/000defaultroute
set -e
/sbin/route add default dev $PPP_IFACE
Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • I have had to add the line 'usepeerdns' to my /etc/ppp/options.pptp, Also, in the meantime I have found a [useful article on nixCraft regarding pptp-client](http://www.cyberciti.biz/tips/howto-configure-ubuntu-fedora-linux-pptp-client.html) – noname Sep 07 '11 at 00:21