How to setup PPTP VPN in Linux

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

pty "pptp host --nolaunchpppd"
name username
remotename PPTP
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


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

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

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.

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

Comments are closed.