Wed Sep 24 13:40:13 EEST 2008

Configure Wireless Internet on Linux in Arnhem Business School ( Hogelschool van Arnhem and Nijmegen ).

I was able to configure SecureW2's Wireless Internet within ABS (Arnhem Business School) on Linux. By taking some time to experiment. Here is how I did it.
1. You'll need the package wpasupplicant
2. Use wpa_supplicant.conf configuration like this one:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
#fast_reauth=1


network={
         ssid="han"
         scan_ssid=1
         key_mgmt=IEEE8021X
         eap=TTLS
         phase2="auth=PAP"
         identity="your_username"
         password="yoursecretpass"
         priority=100
}

Put the above configuration in let's say /etc/ under the name wpa_supplicant.conf
Create a script han-internet.sh, put the following within the script
#!/bin/sh
# Written by hip0 23.09.2008
# Under GPL v2
# Read it here http://gnu.org/licenses/gpl2.txt

# kill any existing instances of wpa_supplicant or dhclient 
if [[ $(ps ax |grep -i dhclient|grep -v grep) ]]; then
killall -9 dhclient >/dev/null 2>&1
fi

if [[ $(ps ax |grep -i wpa_supplicant|grep -v grep) ]]; then
killall -9 wpa_supplicant >/dev/null 2>&1
fi

# initialize connection to the HAN wireless AP
wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf
sleep 5;
dhclient -nw wlan0 >/dev/null 2>&1

If you're a debian user you could configure your machine to connect to your wireless network during boot:
To do this you have to:
Edit /etc/network/interfaces
Add something similar in it:
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
pre-down killall -9 wpa_supplicant
pre-down killall -9 dhclient

Don't forget to change your interface name mine is wlan, yours could be different
3. Enjoy your Wireless Internet within the HAN building! :)
P.S. I configured that on my Debian 4.0 system, but I think t would work with any other Linux/BSD system out there