How to setup PPTP VPN in Linux

1. Create a file /etc/ppp/peers/name:

pty "pptp host --nolaunchpppd"
name username
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam name

2. Add this line to the file /etc/ppp/chap-secrets:

username PPTP password *

3. Create a file /etc/ppp/ip-up.d/tunnel

#!/bin/sh

if [ "${PPP_IPPARAM}" = "name" ]; then
route add -net RemoteNetworkWithNetmask dev ${PPP_IFACE}
fi

RemoteNetworkWithNetmask is the network on the remote side you want to access via the VPN tunnel, e.g. 172.16.0.0/12.

Connect by running sudo pon name
Disconnect by running sudo poff
Check what happends by running plog

You can setup several VPN connections with different names, but I’m not sure if it’s possible to connect to more than one at the same time.

This is tested in Ubuntu desktop 8.04 (hardy) desktop.

This entry was posted in Linux. Bookmark the permalink.

3 Responses to How to setup PPTP VPN in Linux

  1. hampe says:

    Jag har letat efter det här så länge!! 😀
    Köpte en vpn tunnel av https://www.anonine.com/ som kör pptp tekniken .. och saknar howto i linux.. och det här var ju av mkt hjälp.. tack!!

  2. Pingback: Anonine linux | Jeebr

Leave a Reply

Your email address will not be published. Required fields are marked *



(this is a captcha)