Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
remote IP address

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
up vote 2 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


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.