PPTP

Introduction
Note: please see the Discussion tab for this page for a much simpler PPTP setup procedure (awaiting feedback before merging into this page).

Point to Point Tunneling Protocol (PPTP) is a commonly used VPN protocol for Microsoft servers This tutorial is intended to help you set up and authenticate a VPN endpoint using PPTP.

Bridging (allowing other computers to use the VPN), and accessing Microsoft data shares are separate topics, and would be handled by their own tutorials

Configure the Kernel
Set up PPP support, and needed cryptography support in the kernel

Install your new kernel and modules (Covered elsewhere)

Setting up the VPN
At this stage ppp and pptpclient are ready to go, but useless, because you need to set up the specifics of your VPN. You ought to have a domain, username, password, the range of IP addresses your VPN consists of (for routing purposes), and the IP address of the VPN server. Some servers require you to put in both domain and user, on some a username is sufficient. You will also be creating an alias for the connection, we will call it my_vpn for this example.

Setting your specific VPN details
You can either use the 'pptpsetup' command to generate the necessary configuration files, or create them by hand.

pptpsetup example
Replace the following values: For more information, execute
 * my_vpn: Name of your VPN connection. Choose one.
 * 123.123.123.123: IP address or host name of the VPN server.
 * my_domain: domain name (not always required)
 * my_username: username of your VPN account
 * my_password: password of your VPN account

Creating configuration files by hand
{{Note|Newer versions of ppp use "mppe required" instead of "require-mppe-128"}

Testing
You may now want to test your connection. If all went well it will look something like this:

ifconfig

You may now wish to try to connect to a known address on the vpn, then disconnect for now

If things don't work, before you go crazy and start over, check for misspellings and other minor name glitches, you have just typed a whole bunch of stuff and it is easy to use a slightly different name in one place or put to many 'p's in ppptp.

Setting it up as a Gentoo network interface
For the last step, you will create an init script in the traditional Gentoo fashion. For baselayout <= 2.0:

This is an example for baselayout 2.0 with All Traffic Through Tunnel:

And create a link to the standard network initscript for ppp0

Troubleshooting
There is a good troubleshooting section at the pptp homepage.