LoweyPages - The Next Inevitable Step

Wireless Access using Linux at UWA

Okay.  Before I go any further I will warn you now:  Getting the wireless access working at the University of Wales, Aberystwyth is a pain in the arse.

TODO:

Missing info on
- need to install PPP
- need to build the crc_ccitt module in Kernel
- info on loading ppp_generic

Pre-requisites

- A working wireless card
- A working VPN/RAS password (test it from another machine that has a known working installation on it)
- A good idea of how to rebuild your kernel
- Know how to load modules
- Know how to set modules to load at boot or at runtime
- Have an idea of how to patch your kernel
- Intelligence ... aka some experience with Linux.

Steps

1. Download MPPE/MPPC

Get MPPE/MPPC from http://www.polbox.com/h/hs001/ and apply it as a kernel patch against your existing kernel source.  Download the patch to your user directory.

# gunzip linux-2.6.9-mppe-mppc-1.2.patch.gz
# cd /usr/src/linux
# patch -p1 -d . <~/linux-2.6.9-mppe-mppc-1.1.patch

2. Configure the kernel

This will add PPP, PPTP and MPPE/MPPC support:

Device Drivers -->
Networking Support -->
  PPP (point-to-point protocol) support
  PPP support for async serial ports
  Microsoft PPP compression/decompression (MPPC/MPPE)

It may also be worthwhile compiling in all the options in the cryptographic API submenu...  But I don't and seem to get away with it.

3. Rebuild your kernel:

(rough instructions for 2.4.x)

# make dep
# make bzImage modules modules_install
# cp arch/i386/boot/bzImage /boot/kernel-2.4.x
# lilo

(rough instructions for 2.6.x)

# make
# make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-2.6.x
# lilo

4. Reboot!

Once you've installed the new kernel you will need to boot it in order to gain the benefits of the new options you have configured.

5. Testing the configuration

First, let's try getting a wireless connection.  Load whatever modules you need for your wireless card (assuming you built them as modules):

e.g.

# modprobe orinoco_cs

Next try using DHCP to find an IP address:

# dhcpcd eth1

If that works okay then load in the MPPE/MPPC module:

# modprobe ppp_mppe_mppc

Make sure it works, if it doesn't you may have problems later.

6. Set up the VPN

This is the difficult bit.  I.S. hide the information on how to do this.  I had to guess using trial and error.

You need to edit the file /etc/ppp/chap-secrets and make it look like this:

(Assuming your username is uid3 and your VPN/RAS password is myp@ssw0rd)

uid3 PPTP myp@ssw0rd *
PPTP uid3 myp@ssw0rd *

Check the file /etc/ppp/options.pptp ... some people have reported that the option

mppe-128

has to appear in this file.  Personally I took it out and it worked.

You may find it useful to load the MPPC/MPPE module when PPP is started...  But you may prefer to load it on boot.  To load it with PPP, edit the /etc/ppp/ppp_onstart file:

#!/bin/sh

/sbin/modprobe ppp_mppe_mppc

Edit the file /etc/ppp/ip-up:  Add the lines

PRIMARY=ppp0
SERVER=vpn.aber.ac.uk

I put them right at the top of the file, after the #!/bin/sh

Now, create the file /etc/ppp/peers/tsunami:

pty "pptp vpn.aber.ac.uk --nolaunchpppd"
name uid3
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam tsunami

Hopefully, this is all you will need.  Hopefully.

7. Test the setup

# pon tsunami
# ifconfig

If ifconfig lists ppp0 then it worked.  You have a VPN connection.  Lucky you.  Pat yourself on the back.  If it doesn't you will need to faff with the settings.  Try changing /etc/ppp/peers/tsunami from:

pty "pptp vpn.aber.ac.uk --nolaunchpppd"
name uid3
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam tsunami

to

pty "pptp vpn.aber.ac.uk --nolaunchpppd"
name uid3
remotename PPTP
# require-mppe-128
file /etc/ppp/options.pptp
ipparam tsunami

Why?  Because I.S. seem to have faffed with the settings and no longer require the MPPE-strong encryption.

8. Set the routing/proxy information

# route add -net 0.0.0.0 netmask 0.0.0.0 dev ppp0

This will tell it to route everything, by default, over the VPN connection.  Also, if you haven't already done so, you will need to set your proxy settings.  This is done with the environment variables $http_proxy and ftp_proxy:

# export http_proxy='wwwcache.aber.ac.uk:8080'
# export ftp_proxy='wwwcache.aber.ac.uk:8080'

Once you've done this, everything should now work...

# ping google.com
64 bytes from 216.239.37.99: icmp_seq=1 ttl=235 time=86.5 ms

If it doesn't work then something went wrong somewhere.  Sorry!

Last updated 1st of Febraury 2005 at 20:19

For web design go to Shoestring Websites!

| Home |
---
| Blog |
| Serious |
| Software |
| Linux |
| Humour |
| Tunes |
---
| Disclaimer |