Search:  
Gentoo Wiki

HOWTO_PPTP_tunnels_with_kernel_2.6

Contents

There is a more comprehensive guide at the wiki here

This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Obtain the right kernel

Start by making sure that you have a 2.6 kernel, and that your /usr/src/linux symlink points to it: (replace the Xs with the appropriate value)

emerge gentoo-sources
cd /usr/src
rm -f linux
ln -s linux-2.6.X-gentoo-rX linux

Downloading the Software

Kernel Patch

Download and patch your kernel source tree with the downloaded patch. Install the appropriate MPPE/MPPC patch from here- In case of the 2.6.9 kernel it's linux-2.6.9-mppe-mppc-1.1.patch.gz

wget http://www.polbox.com/h/hs001/linux-2.6.9-mppe-mppc-1.1.patch.gz
zcat linux-2.6.9-mppe-mppc-1.1.patch.gz | patch -p1 -d linux-2.6.9-gentoo-r4

Getting our portage sources

emerge ppp
emerge pptpclient

Configure the kernel

Configure your kernel, make sure all these are enabled/compiled as modules:

Linux Kernel Configuration: PPP Support
#Device Drivers ---> Networking support ---> 
  <M> PPP (point-to-point protocol) support 
  <M>   PPP support for async serial ports 
  <M>   Microsoft PPP compression/encryption (MPPC/MPPE) 
 #Cryptographic options  ---> 
  [*] Cryptographic API 
  <M>   ARC4 cipher algorithm

Install and reboot

Install your kernel, install modules, and reboot if necessary. Don't forget to run update-modules

make
make install
make modules_install
update-modules
reboot

Make sure everything is working

Check, if module is working

modprobe ppp_mppe_mppc

Set up configuration

USE Flags

Modify /etc/make.conf and add mppe-mppc to your USE flags:

File: /etc/make.conf
USE="mppe-mppc"

PPP

Modify /etc/ppp/options.conf - Change (comment out) these lines:

File: /etc/ppp/options.conf
mppe-40
mppe-128
mppe-stateless

so it reads:

#mppe-40
#mppe-128
#mppe-stateless

Edit /etc/ppp/chap-secrets, add:

File: /etc/ppp/chap-secrets
DOMAINNAME\\username ANYVPNNAME password
ANYVPNNAME DOMAINNAME\\username password

If you are using a PPTP Server that does not require a domain name, omit the slashes as well as the domain name.

Edit or create /etc/ppp/peers/ANYVPNNAME:

File: /etc/ppp/peers/ANYVPNNAME
# Server IP: XX.YY.ZZ.AA
# Route: add -net XX.YY.0.0 netmask 255.255.0.0 dev TUNNEL_DEV

name DOMAINNAME\\username
remotename ANYVPNNAME

file /etc/ppp/options.pptp

Start the tunnel

If all goes well, you can start your tunnel:

pptp-command start ANYVPNNAME

See Also

Retrieved from "http://www.gentoo-wiki.info/HOWTO_PPTP_tunnels_with_kernel_2.6"

Last modified: Thu, 04 Sep 2008 04:13:00 +0000 Hits: 35,472