[pptp-server] Kernel 2.2.16 + mppe_patch + ppp-2.3.11 (mini-HOWTO :)

Vanja Hrustic vanja at relaygroup.com
Fri Jun 9 16:40:11 CDT 2000


Hi!

I've spent some time trying to install ppp-2.3.11 on new kernel
(2.2.16), but it kept spitting errors. At the end, I've made it work. If
someone is interested (and also had problems :), here is what I did to
make it work. Also, if I've actually made some error (and didn't realize
it), let me know :)

btw: you probably know about CAP_SETUID problem, and everyone should
upgrade the kernel to 2.2.16, bla, bla...



+ = mandatory
o = optional (just to show what I've done, and that it worked with
additional patches, in case someone wants to try the same)


+ get 2.2.16 sources
  http://www.kernel.org/pub/linux/kernel/v2.2/

o install Solar Designer's patch (might save your life one day ;)
  http://www.openwall.com/linux/

o install IDE patches (if you have some newer motherboard and want ATA66
or even ATA100 support)
  http://www.kernel.org/pub/linux/kernel/people/hedrick/
  http://priv4.onet.pl/war/bkz/ (you might find newer/updated version
here)
  http://www.linux-ide.org/ (for ATA100 details)

+ get ppp-2.3.11 sources
  ftp://ftp.linuxcare.com.au/pub/ppp/

+ get ppp-2.3.11_mppe patch
  ftp://ftp.binarix.com/pub/ppp-mppe/

Steps:

--[1]--

Unpack/patch (with OW and IDE patches) the kernel. Don't forget to make
proper link for /usr/src/linux if you are unpacking sources as
/usr/src/linux-2.2.16, for example.

--[2]--

Unpack ppp-2.3.11 sources somewhere (/var/tmp, for example), and copy
'ppp-2.3.11-openssl-0.9.5-mppe.patch.gz' file into that directory.

# cd /var/tmp/ppp-2.3.11
# gzip -d ppp-2.3.11-openssl-0.9.5-mppe.patch.gz
# patch -p1 < ppp-2.3.11-openssl-0.9.5-mppe.patch
# ./configure
# make
# make install

At this point, you are supposed to do "# make kernel". However, on my
systems (RH 6.1 machines, with 2.2.15 and 2.2.16 kernels), it would
update some of the files in /usr/src/linux, and would not update some
others. That was resulting in errors during the compilation. What I did
was to edit linux/kinstall.sh (in ppp-2.3.11 dir).

You will see a part that looks like:

-----------------------------------------------------
for FILE in $LINUXSRC/drivers/net/bsd_comp.c \
            $LINUXSRC/drivers/net/ppp_deflate.c \
            $LINUXSRC/drivers/net/zlib.c \   
            $LINUXSRC/drivers/net/zlib.h \
            $LINUXSRC/drivers/net/ppp_mppe.c \  
            $LINUXSRC/drivers/net/ppp_lzscomp.c \
            $LINUXSRC/drivers/net/ppp_lzscomp.h \
            $LINUXSRC/drivers/net/mppe.h \
            $LINUXSRC/drivers/net/sha.h \
            $LINUXSRC/drivers/net/sha1dgst.c \
            $LINUXSRC/drivers/net/sha_locl.h \
            $LINUXSRC/drivers/net/rc4_enc.c \
            $LINUXSRC/drivers/net/rc4_skey.c \
            $LINUXSRC/drivers/net/rc4.h \
            $LINUXSRC/drivers/net/rc4_locl.h \
            $LINUXSRC/include/linux/if_ppp.h \
            $LINUXSRC/include/linux/if_pppvar.h \
            $LINUXSRC/include/linux/ppp-comp.h \
            $LINUXSRC/include/linux/ppp_defs.h
  do
  installfile $FILE no
done
-----------------------------------------------------

Make it look like:

-----------------------------------------------------
for FILE in $LINUXSRC/drivers/net/bsd_comp.c \
            $LINUXSRC/drivers/net/ppp_deflate.c \
            $LINUXSRC/drivers/net/zlib.h \
            $LINUXSRC/drivers/net/ppp_mppe.c \  
            $LINUXSRC/drivers/net/ppp_lzscomp.c \
            $LINUXSRC/drivers/net/ppp_lzscomp.h \
            $LINUXSRC/drivers/net/mppe.h \
            $LINUXSRC/drivers/net/sha.h \
            $LINUXSRC/drivers/net/sha1dgst.c \
            $LINUXSRC/drivers/net/sha_locl.h \
            $LINUXSRC/drivers/net/rc4_enc.c \
            $LINUXSRC/drivers/net/rc4_skey.c \
            $LINUXSRC/drivers/net/rc4.h \
            $LINUXSRC/drivers/net/rc4_locl.h
  do
  installfile $FILE no
done
-----------------------------------------------------

In other words - remove the lines:

$LINUXSRC/drivers/net/zlib.c \
$LINUXSRC/include/linux/if_ppp.h \
$LINUXSRC/include/linux/if_pppvar.h \
$LINUXSRC/include/linux/ppp-comp.h \
$LINUXSRC/include/linux/ppp_defs.h

Note that there is no backslash in the last entry (rc4_locl.h) :)

Next, comment out the line:

installfile $LINUXSRC/drivers/net/ppp.c yes

so that it looks like:

#installfile $LINUXSRC/drivers/net/ppp.c yes

Then, edit the file /usr/include/linux/ppp-comp.h, and add these 2
entries at the bottom, below the line that says:

/*
 * Definitions for other, as yet unsupported, compression methods.
 */

These are the entries:

#define CI_MPPE                 18
#define CILEN_MPPE              6

[3]

Now, run the "# make kernel" from the /var/tmp/ppp-2.3.11 directory. The
kernel sources should be patched, and some files added.

[4]

# cd /usr/src/linux
# make menuconfig
... configure whatever you need - you'll need to enable 'experimental'
options in order to activate ATA drivers ...
# make dep; make bzImage; make modules; make modules_install
[ if compilation didn't stop with error - it's a good sign :]
... copy System.map to /boot/System.map-2.2.16, make a link to
System.map, copy arch/i386/boot/bzImage to /boot/whatever_you_want,
update /etc/lilo.conf, execute # /sbin/lilo

[5]

These steps are covered in other FAQs:

- build pptpd-1.0.0, install it, create /etc/pptpd.conf, modify
/etc/ppp/options, modify /etc/syslogd.conf, restart syslog, etc.

IMPORTANT:

Do NOT forget to add:

alias ppp-compress-18 ppp_mppe

in your /etc/conf.modules file

I've tested it with plain WinNT 4.0 WKS, Win2000 and with Win2000+128bit
patch. It worked just fine. I didn't test it with linux client though,
but I'll do it sooner or later.

If you have received any errors during the compilation, let me know.
Maybe I've mixed up some steps in this 'faq' and... don't hate me, it's
4:30am in here :)

And thanks to all people that were/are involved in PoPToP :)

Regards,

Vanja Hrustic
The Relay Group
http://relaygroup.com
Technology Ahead of Time



More information about the pptp-server mailing list