Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer
    
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 –  noname Sep 7 '11 at 0:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.