Here’s a quick guide that I write as I’m setting up PPTP/MPPE/MPPC on a Linux server. My preferred VPN technology is OpenVPN mainly because it’s so quick and easy to set up and use, however in some cases PPTP is required chiefly when the Client wants to use the inbuilt Windows VPN capabilities rather than having to deploy 3rd party software.

My server is a Debian (of course) etch machine, with 2.6.24 (from source) kernel. My client is Windows XP Pro SP3.

Firstly, patch the kernel for MPPC and rebuild. My source directory is /usr/src/linux:

For the MPPC and PPP patches, visit http://gaute.vetsj.com/?p=69

cd /usr/src/linux
wget http://gaute.vetsj.com/arkiv/2008-03-19%20-%20arch-mppc/kernel26/linux-2.6.24-mppe-mppc-1.3.patch
patch -p1 < linux-2.6.24-mppe-mppc-1.3.patch #Ignore warnings in the case of 2.6.18 at least anyway
make #When prompted RE MPPE/MPPC select ‘m’ for Module
make modules_install

Now download and patch ppp:

cd /usr/src/
wget ftp://ftp.samba.org/pub/ppp/ppp-2.4.4.tar.gz
tar -xzf ppp-2.4.4.tar.gz
cd ppp-2.4.4
wget http://gaute.vetsj.com/arkiv/2008-03-19%20-%20arch-mppc/ppp/ppp-2.4.4-mppe-mppc.1.1.patch
patch -p1 < ppp-2.4.4-mppe-mppc.1.1.patch
./configure
make
make install

Now install poptop:

cd /usr/src/
wget ‘http://downloads.sourceforge.net/poptop/pptpd-1.3.4.tar.gz?modtime=1176722091&big_mirror=1’
tar -xzf pptpd-1.3.4.tar.gz
cd pptpd-1.3.4
./configure
make
make install

Create /etc/pptpd.conf:

option /etc/ppp/options-pptpd
localip 10.0.0.1
remoteip 10.0.0.2-10

Create /etc/ppp/options-pptpd:

name *
debug debug
logfd 2
lock
mtu 1450
mru 1450
proxyarp
auth
ipcp-accept-local
ipcp-accept-remote
lcp-echo-failure 3
lcp-echo-interval 5
deflate 0
+chap
+mschap-v2
mppe required

Assign a username and password. Edit /etc/ppp/chap-secrets Add:

#Where Username and Password are your username and password respectively. You may add as many entries as you wish
Username * Password *

Set permissions:

chmod 600 /etc/ppp/chap-secrets

Allow masquerading if you wish. Where eth0 is your external interface:

modprobe ipt_MASQUERADE
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

Launch the pptp daemon:

pptpd -d -e /usr/local/sbin/pppd

Make sure you have relevant kernel modules loaded, specifically ppp_mppe_mppc

You should be able to configure your Windows client by following the default setup wizard, no changes should be required.

Full logging is turned on in /var/log/daemon.log