pptp client
 getting started
 try it
 fedora core 1
 fedora core 2
 fedora core 3
 fedora core 4
 fedora core 5
 fedora core 6
 mandrake 9.0
 mandrake 10.0
 mandrake 10.1
 red hat 9
 red hat 8.0
 red hat 7.3
 suse 10.0
 suse 9.2
 suse 9.1
 suse 8.2
 support faq
 contact us

PPTP Client

Red Hat 8.0 MPPE Kernel Build HOWTO
by James Cameron
21st February 2003

This describes how to rebuild the kernel on Red Hat 8.0 to include MPPE support, for using PPTP. It was tested on a system installed from CD-ROM, without updates. You will need software engineering build skills or lots of patience.


  • use the kernel and PPP sources to make a source code patch relative to the kernel release,
  • apply the patch to the official kernel source RPM, and;
  • build a new binary RPM, install, reboot, and test.

Process Diagram

This diagram shows the process that is to be followed. The numbers in the yellow boxes correspond to steps in these instructions, but not all the steps are shown. Flat boxes are files or directories. Lines show the flow of data. The colours have been chosen to indicate various attributes:

  • provided file - a file that you obtain from this web site, Red Hat's web site, or from the Red Hat distribution CDs,
  • local directory - a directory on your system that will hold temporary files,
  • generated local file - a file that will be generated as a result of doing a process,
  • process - a command, or set of commands that you do.

Process Steps

  1. install the kernel source package (from CD #2 on Red Hat 8.0):

    rpm --install kernel-source-2.4.18-14.i386.rpm

    Note: if you have a /usr/src/linux-2.4.18-14 directory already from a previous kernel build on this system, remove it or change the name. These instructions depend on the directory being created from the source RPM without any previous changes.

  2. duplicate source prior to generating the patch:

    cd /usr/src
    mkdir linux-2.4.18-14.orig
    cd linux-2.4.18-14
    tar cf - .|(cd ../linux-2.4.18-14.orig/;tar xf -)

  3. fetch PPP source kit:

    cd /usr/src
    wget http://quozl.netrek.org/pptp/ppp-2.4.2_cvs_20021120.tar.gz
    tar xvfz ppp-2.4.2_cvs_20021120.tar.gz

    This source kit was generated from the PPP CVS at a particular date. You may wish to obtain PPP from CVS directly yourself. See the PPP project.

  4. apply kernel patches:

    cd /usr/src/ppp-2.4.2_cvs_20021120/linux/mppe
    chmod +x mppeinstall.sh
    ./mppeinstall.sh /usr/src/linux-2.4.18-14

  5. optional method to determine changed file list:

    cd /usr/src
    rsync -av --dry-run linux-2.4.18-14/* linux-2.4.18-14.orig/

  6. generate patch relative to distributed source:

    cd /usr/src/
    find linux-2.4.18-14 -name "*.orig" -exec rm {} \;
    rm -f linux-2.4.18-ppp-2.4.2.patch
    diff --new-file --recursive --unified \
    linux-2.4.18-14.orig/drivers/net \
    linux-2.4.18-14/drivers/net > \
    diff --new-file --recursive --unified \
    linux-2.4.18-14.orig/include/linux \
    linux-2.4.18-14/include/linux >> \

  7. optional review of the patch:

    grep +++ linux-2.4.18-ppp-2.4.2.patch
    more linux-2.4.18-ppp-2.4.2.patch

    The patch affects the files listed below.

    drivers/net/arcfour.c drivers/net/arcfour.h drivers/net/Config.in drivers/net/Makefile drivers/net/ppp_generic.c drivers/net/ppp_mppe_compress.c drivers/net/sha1.c drivers/net/sha1.h include/linux/ppp-comp.h

    The file ppp-comp.h is included by other kernel modules, but the patch only adds new text used by the other files patched. It may be possible to distribute the kernel modules only. Advice from others is welcome!

  8. install source kit for kernel (from CD #4):

    rpm -i kernel-2.4.18-14.src.rpm

  9. copy patch to SOURCES:

    cp linux-2.4.18-ppp-2.4.2.patch /usr/src/redhat/SOURCES/

  10. adjust kernel-2.4.spec, change release version, include patch:

    cd /usr/src/redhat/SPECS
    cp kernel-2.4.spec kernel-2.4.spec.orig
    patch << EOF
    --- kernel-2.4.spec.orig        2002-11-19 21:57:46.000000000 +1100
    +++ kernel-2.4.spec     2002-11-19 22:02:30.000000000 +1100
    @@ -27,7 +27,7 @@
     # that the kernel isn't the stock RHL kernel, for example by
     # adding some text to the end of the version number.
    -%define release 14
    +%define release 14mppe
     %define sublevel 18
     %define kversion 2.4.%{sublevel}
     # /usr/src/%{kslnk} -> /usr/src/linux-%{KVERREL}
    @@ -562,6 +562,7 @@
     Patch5261: linux-2.4.18-cryptoapi.patch
     Patch5270: linux-2.4.18-audigy.patch
     Patch5280: linux-2.4.18-usblcd.patch
    +Patch5799: linux-2.4.18-ppp-2.4.2.patch
    @@ -1494,6 +1495,11 @@
     %patch5280 -p1
    +# PPP MPPE support
    +%patch5799 -p1
     # debug mmap semaphore recursion deadlocks
     # by keeping track of who owns what

    Note: this patch also available for errata kernel 2.4.18-24.8.0 thanks to Sean Closson.

    Packaging issue, can't figure out how to patch for config change that adds CONFIG_PPP_MPPE.

    • ppp 2.4.2 patches only drivers/net/Makefile and drivers/net/Config.in

    • kernel 2.4.17 debian source CONFIG_PPP_DEFLATE appears in Documentation/Configure.help drivers/net/Makefile drivers/net/Config.in and various arch defconfig files,

    • kernel 2.4.18 red hat kernel-source.rpm CONFIG_PPP_DEFLATE appears in Documentation/Configure.help configs drivers/net/Config.in drivers/net/Makefile include/linux/autoconf.h lib/Config.in and .config

    • interim rpmbuild BUILD tree at point of patch failure has CONFIG_PPP_DEFLATE appearing in lib/Config.in drivers/net/Makefile drivers/net/Config.in various defconfig files Documentation/Configure.help

    So we guess we just patch the config file!

  11. patch the configuration files for the kernel version:

    cd /usr/src/redhat/SOURCES
    for kcfg in kernel-2.4.18-i586*.config
    patch << EOF
    --- $kcfg.orig
    +++ $kcfg
    @@ -674,6 +674,7 @@
     # CONFIG_PPP_BSDCOMP is not set
     # CONFIG_PPPOE is not set

  12. build the kernel:

    cd /usr/src/redhat/SPECS
    time \
    rpmbuild -ba --target=i586 kernel-2.4.spec

    Note: we've assumed i586 processor type in these instructions. You may need another processor type. Change the references accordingly.

  13. install the kernel:

    rpm --install /usr/src/redhat/RPMS/i586/kernel-2.4.18-14mppe.i586.rpm

  14. if this system has previously had an MPPE kernel module set installed, ensure that /etc/modules.conf is correct ... tests so far suggest that these lines are no longer required:

    alias ppp-compress-18 ppp_mppe
    alias ppp-compress-21 bsd_comp
    alias ppp-compress-24 ppp_deflate
    alias ppp-compress-26 ppp_deflate
    alias char-major-108 ppp_generic

  15. reboot:


  16. test that the module loads:

    modprobe ppp-compress-18

    The expected output is:

    Warning: loading /lib/modules/2.4.18-14mppe/kernel/drivers/net/ppp_mppe.o will taint the kernel: non-GPL license - BSD without advertisement clause
    See http://www.tux.org/lkml/#export-tainted for information about tainted modules
    Module ppp_mppe loaded, with warnings


  1. return to the prebuilt RPM document; you have now completed steps 1a, 1b, and 1c on that document, you should now proceed from step 1d and install PPP.


If you have comments on this document, please send them to the author at james.cameron at hp.com.


Add latest errata spec file patch, contributed by Sean Closson.

Change more config files. Contributed by Steve Cohen.

2003-01-21 Fix the --install to avoid --upgrade. Mention processor type note.

2003-01-13 Warn that kernel source directory must be empty to begin with.

2002-12-30 Explain where to go next after completing the build and install.

2002-11-29 Added process diagram following feedback from people not accustomed to building from source.

2002-11-28 On kernels on release 18 or later, the SMP config file also needs to be edited. Minor edits to text, thanks to Jimmy Vance.

2002-11-22 First draft.