pptp client
 overview
 license
 getting started
 features
 try it
 download
 links
 documentation 
 index
 debian
 fedora core 1
 fedora core 2
 fedora core 3
 fedora core 4
 fedora core 5
 fedora core 6
 gentoo
 knoppix
 mandrake 9.0
 mandrake 10.0
 mandrake 10.1
 netbsd
 red hat 9
 red hat 8.0
 red hat 7.3
 suse 10.0
 suse 9.2
 suse 9.1
 suse 8.2
 ubuntu
 diagnosis
 support faq
 diagrams
 routing
 security
team
 developers
 cvs
 contact us
 

PPTP Client


Debian HOWTO

by James Cameron
23rd August 2002

Installing the PPTP Client on Debian is described here as a seven stage process; the kernel patch for MPPE, pppd with MPPE, PPTP command, configuration, activation, monitoring and shutdown.


  1. kernel patch for MPPE

    Problem: pppd for PPTP needs MPPE for my tunnel. Your PPTP Server may not need this. It is needed if you are connecting to a Microsoft Windows VPN Server.

    Solution: fetch the source and the patch, apply the patch, build a new kernel package, install it.

    # apt-get install kernel-package kernel-source-2.2.19 gcc bin86 kernel-patch-mppe
    # cd /usr/src && tar xfj kernel-source-2.2.19.tar.bz2
    # cd kernel-source-2.2.19 && make-kpkg clean
    # cp /boot/config-2.2.19 ./.config
    # /usr/src/kernel-patches/all/apply/mppe
    # make-kpkg binary
    # dpkg -i ../kernel-image-2.2.19_Custom.1.00_i386.deb

    The procedure for other kernel version is identical, thanks to Debian's excellent kernel packaging package.

    Ensure that the configuration builds PPP support as modules. We've found that static compilation results in pppd being unable to load MPPE. Set CONFIG_PPP=m in .config.

    As of August 2002, kernel-patch-mppe is in testing and unstable, not in stable. It was dropped from stable due to installation bugs. Refer to the package page to find it if your system doesn't know about it.

    Debian Bug 143616 contains a patch to kernel-patch-mppe that fixes compilation on kernel 2.4.19.


  2. pppd with MPPE

    Problem: PPTP needs MPPE for my tunnel. Your PPTP Server may not need this.

    Solution: fetch the ppp-mppe source package, build and install it.

    # cd /usr/src;wget \
    http://prdownloads.sourceforge.net/pptpclient/\
    /ppp-mppe-2.4.0-4.tar.gz
    # tar xfz ppp-mppe-2.4.0-4.tar.gz
    # cd ppp-mppe-2.4.0-4;. unpack.sh
    # cd ppp-2.4.0;./configure
    # make
    # mv /usr/sbin/pppd /usr/sbin/pppd.orig
    # cp pppd/pppd /usr/sbin/pppd


  3. PPTP

    Problem: need the PPTP command and the IP/GRE encapsulator

    Solution: already a Debian package, so just install it.

    # apt-get install pptp-linux


  4. configuration

    Problem: manual configuration of the PPTP link.

    Solution: the Red Hat specific pptp-command script does this, however it is wisely not shipped with the Debian package. Various settings were copied from the pptp-command script defaults to form this working configuration.

    cd /etc/ppp

    cat << EOF > options.pptp
    lock noauth nobsdcomp nodeflate mppe-40
    mppe-128 mppe-stateless mtu 1000 mru 1000
    EOF

    cat << EOF >> chap-secrets
    domain\\\\username PPTP password
    PPTP domain\\\\username password
    EOF

    cat << EOF > peers/tunnel
    pty "pptp 10.0.0.5 --nolaunchpppd"
    name domain\\\\username
    remotename PPTP
    require-chapms-v2
    file /etc/ppp/options.pptp
    ipparam tunnel
    EOF

    Change domain and username to the domain name and username supplied by the administrator of the Microsoft Windows VPN Server. If you are using another PPTP Server, you may need to change domain\\\\username to just username.


  5. activation

    # pon tunnel

    A remarkably useful alternate technique is to use the updetach keyword, which pppd uses to detach once the network link is up. This example connects a provider link, then the tunnel, then runs fetchmail to get new e-mail::

    # pon provider updetach && pon tunnel updetach && fetchmail


  6. monitoring

    Problem: need to know what is going on.

    Solution: various options.

    Output of pppd showing call management:

    # plog -f

    Graphical display of bandwidth utilisation between ppp0 and ppp1 (my configuration uses a 56k modem as the primary network link on ppp0):

    # apt-get install gkrellm
    # gkrellm

    Packet tracing:

    # tcpdump -i ppp0 -n


  7. shutdown

    Problem: how to shutdown the pptp link gracefully.

    Solution: kill the pppd process using the conventional poff:

    # poff tunnel