[pptp-server] PoPToP + 2.2.16 + ppp-2.3.11 + mppe

Elliott Stern estern at opennetwork.com
Thu Aug 3 10:28:23 CDT 2000


This is basically a combination of info from Vanja, Boris, and the
PoPToP-RedHat-HOWTO.
Actually, It is quite literally a combination...cut, paste, modify. 
Vanja and Boris helped me get a good start.  Here is the way I did it
[without downloading too many patches]. I am currently using a Red Hat
Linux [6.2] with the Red Hat 2.2.16-3 kernel RPMed.

What you need.
 -Linux kernel 2.2.16
[ftp.kernel.org/pub/linux/kernel/2.2/linux-2.2.16.tar.bz2]
 -PPP 2.3.11   [ftp.linuxcare.com.au/pub/ppp/ppp-2.3.11.tar.gz]
 -MPPE Patch
[ftp.binarix.com/pub/ppp-mppe/ppp-2.3.11-openssl-0.9.5-mppe.patch.gz]
 -PoPToP 1.0.0
[http://www.moretonbay.com/vpn/releases/pptpd-1.0.0-1.i386.rpm]


a) Download the files above.
    Download linux-2.2.16.tar.bz2 to /usr/src
    Download ppp-2.3.11.tar.gz to /usr/src
    Download ppp-2.3.11-openssl-0.9.5-mppe.patch.gz to /usr/src
    Download pptpd-1.0.0-1.i386.rpm to /usr/src/redhat/RPMS/i386

b) Delete the old kernel and create the symlinks

    Remove 'linux' directory (if it exists), or 'linux' symlink (if it
    exists):

    # rm linux (for symlink)
    # rm -rf linux (for directory)

    # tar Ixvf linux-2.2.16.tar.bz2

    It is better to have 'linux' as a symlink (for maintenance reasons
:):

    # mv linux linux-2.2.16
    # ln -s linux-2.2.16 linux

    # cd /usr/include
    # ln -s ../src/linux/include/linux linux
    # ln -s ../src/linux/include/asm asm

c) Update linux kernel files
    # cd /usr/src/linux
    # make menuconfig (or make config depending on what you like better)

    *Make* sure PPP is installed in the kernel either as a module or
built
    into the kernel [I build mine as a module].  When done, remember to
save
    your configuration.  A "HOWTO" can be found at
[http://www.linuxdoc.org]
    if you are not sure how to configure your kernel to support PPP.

d) Install the PPP with MPPE patch
    # cp ppp-2.3.11.tar.gz /usr/src
    # cd /usr/src
    # tar -zxvf ppp-2.3.11.tar.gz
    # rm ppp-2.3.11.tar.gz
    # cp ppp-2.3.11-openssl-0.9.5-mppe.patch.gz /usr/src/ppp-2.3.11
    # cd /usr/src/ppp-2.3.11
    # zcat ppp-2.3.11-openssl-0.9.5-mppe.patch.gz | patch -p1
    # ./configure
    # make
    # make install
    # make kernel
    # cp common/zlib.h /usr/src/linux/drivers/net/
    # cp include/linux/if_pppvar.h /usr/src/linux/include/linux/

e) Time to compile our new kernel and new modules.
    # cd /usr/src/linux
    # make menuconfig

    Kernel configuration is covered on many other places - no need for
    it here; make sure that you build ppp/slip modules though :)

    # make dep clean

    NOTE: If you already have /lib/modules/2.2.16 directory, remove it
    before installing modules
    # rm -rf /lib/modules/2.2.16

    # make modules modules_install
    # make bzImage

    # cp System.map /boot/System.map-2.2.16
    # rm /boot/System.map (if you have it)
    # ln -s /boot/System.map-2.2.16 /boot/System.map
    # cp arch/i386/bzImage /boot/linux-2.2.16
    # rm /boot/vmlinuz (if it is a link)
    # ln -s /boot/vmlinuz /boot/linux-2.2.16
    # cp arch/i386/bzImage /boot/vmlinuz

f) Enable the new kernel
    Edit your /etc/lilo.conf, and make new entry to this kernel. It
should
    probably look like:

-- cut --
image=/boot/vmlinuz
        label=linux
        read-only
        root=/dev/hda3
-- cut --

    NOTE: Make sure that 'root' points to the right device, and if you
are
    using initrd images, create one using 'mkinitrd' command, and add
    appropriate entry!  Also, make sure that the label is unique and set
    the default to the label of the new kernel.

    # /sbin/lilo -v
    # depmod -a

    I have the kernel autoload what it needs.  
    Read the /usr/src/linux/Documentation/kmod.txt file for more info.

g) Set up PPP
    Create /etc/ppp/options file. The following is just an example:

-- cut ---
debug
#kdebug 1 (you can turn this on if you require more debugging)
auth
+chap
+chapms
+chapms-v2
mppe-40
mppe-128
mppe-stateless
proxyarp
ms-wins <your WINS server>
ms-dns <your primary DNS>
ms-dns <your secondary DNS>
require-chap
name servername (you can use some other name, it is up to you)
netmask 255.255.255.0
mru 1400
mtu 1400
ktune
-- cut --

    Create /etc/ppp/chap-secrets file. The following is just an example:

-- cut --
# Secrets for authentication using CHAP
# client        server       secret                  IP addresses
username        servername   password                *
-- cut --

    Make sure permissions are properly set on /etc/ppp/chap-secrets
file:

    # chown root:root /etc/ppp/chap-secrets
    # chmod 600 /etc/ppp/chap-secrets

    Add necessary entries into /etc/conf.modules:

-- cut --
alias char-major-108 off # This will be different for 2.3.x kernels    
alias ppp-compress-18 ppp_mppe    
alias ppp-compress-21 bsd_comp    
alias ppp-compress-24 ppp_deflate    
alias ppp-compress-26 ppp_deflate    
-- cut --

h) Now, RPM pptp
    # cd /usr/src/redhat/RPMS/i386
    # rpm -ivvh pptpd-1.0.0-1.i386.rpm

    Modify the /etc/pptpd.conf file. The following is just an example:

-- cut --
speed 115200
option /etc/ppp/options
debug
localip 192.168.1.230 (IP address which PPTP server will have - can be
single IP)
remoteip 192.168.1.231-253 (pool of IP addresses which will be assigned
to clients)
listen 192.168.1.200 (IP address where pptpd will listen)
-- cut --

    You can add this init script into /etc/rc.d/init.d directory. It was
    originally made by Henri Gomez:

-- cut --
#!/bin/sh
#
# Startup script for pptpd
#
# chkconfig: 345 85 15
# description: PPTP server
# processname: pptpd
# config: /etc/pptpd.conf

# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
  start)
        echo -n "Starting pptpd: "
        if [ -f /var/lock/subsys/pptpd ] ; then
                echo
                exit 1
        fi

        /usr/local/sbin/pptpd -d
        echo
        touch /var/lock/subsys/pptpd
        ;;
  stop)
        echo -n "Shutting down pptpd: "
        killproc pptpd
        echo
        rm -f /var/lock/subsys/pptpd
        ;;
  status)
        status pptpd
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac

exit 0
-- cut --

    Activate it (on RedHat) using command:

    # chkconfig --add pptpd

    If you wish to see some pptpd debugging messages, add the following
    entry to /etc/syslogd.conf:

-- cut here --
daemon.debug     /var/log/pptp.log
-- cut here --

    Reboot...

    After the reboot, you pptpd should be running.


Remember I am building this on a Red Hat distribution. But yours should
work as well [hopefully] :-)

-Elliott

*************************
Elliott Stern
OpenNetwork Technologies
Network Intern
727-561-9500  ext 270
estern at opennetwork.com
*************************



More information about the pptp-server mailing list