Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old September 2nd, 2006   #1
UltraMathMan
Way Too Much Ubuntu
 
UltraMathMan's Avatar
 
Join Date: Jul 2006
Location: United States
Beans: 306
Ubuntu 9.04 Jaunty Jackalope
Post HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

First of all this is my first HOWTO and it details how I got connected to Lehigh University's wireless network with wpa_supplicant. I decided to post this as I was having trouble finding info on this subject [of connecting to a University 802.1x network] and figured this might serve as a springboard to help others connect to their own 802.1x University networks.

**I recommend backing up all config files before editing them and take no responsibility for any damage this may cause**

Ok, that said let's get started, first make sure you have the wpa_supplicant installed.
Code:
sudo apt-get install wpasupplicant
Now create the wpa_supplicant configuration file
Code:
sudo gedit /etc/wpa_supplicant/wpa_supplicant.conf
then paste the following, edit as needed and save.
Code:
# for lehigh university
network={
        ssid="lu"
        scan_ssid=1
        key_mgmt=IEEE8021X
        eap=PEAP
        phase2="auth=MSCHAPV2"
        identity="your university login name"
        password="your password"
}
Now edit /etc/network/interfaces with
Code:
sudo gedit /etc/network/interfaces
adding
Code:
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
under your wireless interface.

Restart networking
Code:
sudo /etc/init.d/networking restart
and enjoy!

Hope this helps somebody

*Adapted from http://coral.ie.lehigh.edu/~asm4/howtos/wireless.html
__________________
Registered Linux User #423733 / Registered Ubuntu User #4140
UltraMathMan is offline   Reply With Quote
Old October 6th, 2006   #2
UltraMathMan
Way Too Much Ubuntu
 
UltraMathMan's Avatar
 
Join Date: Jul 2006
Location: United States
Beans: 306
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

Ok, so I went home today and couldn't connect through Administration -> Networking to my WEP encrypted network. It seems wpa_supplicant takes control of the networking management and for those of you who happen to use this HowTo note that you will need to add any future network config to the wpa_supplicant.conf file eg:
Code:
 # wireless for home
network={
        ssid="your network name"
        key_mgmt=NONE
        wep_key0=
        wep_tx_keyidx=1
}
where wep_key0=your wep key

See the link at bottem of previous post for full config file example.
__________________
Registered Linux User #423733 / Registered Ubuntu User #4140
UltraMathMan is offline   Reply With Quote
Old October 7th, 2006   #3
vkkim
Just Give Me the Beans!
 
Join Date: Jun 2005
Beans: 76
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

Thanks! I'm at LU as well and it works great!
vkkim is offline   Reply With Quote
Old October 9th, 2006   #4
visik7
Just Give Me the Beans!
 
visik7's Avatar
 
Join Date: Mar 2006
Location: Italy
Beans: 61
Ubuntu 7.04 Feisty Fawn
Send a message via ICQ to visik7 Send a message via MSN to visik7 Send a message via Skype™ to visik7
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

better to use the facilities in /etc/network/interfaces

here is my conf:
"DON'T CUT AND PASTE THE CODE MUST BE ADAPTED"
Code:
auto eth1
iface eth1 inet dhcp
        wpa-driver wext # this is the default and useless if set to wext only usefull if you need another driver (supported by wpa_supplicant
        wpa-ap-scan 2
        wpa-ssid <ssid>
        wpa-scan-ssid 1
        wpa-key-mgmt IEEE8021X
        wpa-eap TTLS
        wpa-anonymous-identity anonymous
        wpa-phase2 auth=PAP
        wpa-identity <username>
        wpa-password <password>
but I've a little python script that detect where am I and select the right conf, this is the /etc/network/interfaces:
"DON'T CUT AND PASTE THE CODE MUST BE ADAPTED"
Code:
auto eth1
mapping eth1
        script /etc/network/scripts/checkap
        map uni <replace with the mac address of the campus ap>
        map home <replace with the mac address of the home ap>

iface uni inet dhcp
        wpa-ap-scan 2
        wpa-ssid <ssid>
        wpa-scan-ssid 1
        wpa-key-mgmt IEEE8021X
        wpa-eap TTLS
        wpa-anonymous-identity anonymous
        wpa-phase2 auth=PAP
        wpa-identity <username>
        wpa-password <password>

iface home inet dhcp
        wireless-essid CAME
        wireless-mode managed
and this is the python script for check the wireless
(/etc/network/scripts/checkap)
Code:
#!/usr/bin/python

import time, pyiw, sys, os

excepted = 'yes'
while excepted == 'yes':
        try:
                iface = pyiw.WirelessInterface(sys.argv[1])
                excepted = 'no'
        except:
                excepted = 'yes'
        time.sleep(1)

buffer = sys.stdin.read()

networks = buffer.split('\n')
i=0
while i<len(networks):
        networks[i] = networks[i].split(' ')
        i+=1

for node in iface.Scan():
        for mac in networks:
                if node ['ap_mac'] in mac:
                        print mac[0]
                        break
attached there is a python module needed for discover the wireless (put it in /etc/network/scripts/ or wherever you have the checkap script)
Attached Files
File Type: gz pyiw.gz (8.4 KB, 17 views)

Last edited by visik7; October 9th, 2006 at 06:53 AM..
visik7 is offline   Reply With Quote
Old October 11th, 2006   #5
randomnumber
A Carafe of Ubuntu
 
randomnumber's Avatar
 
Join Date: Oct 2006
Location: Pensacola, FL
Beans: 135
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

I am at UWF (Univ. of West FL) and no one seems to know how to connect to their wireless with linux. I have been using my laptop as a dual boot and been booting XP so that it is logged onto the network then rebooting and using linux. Some how the connection stays. I can even boot linux up an hour later and it will still be able to connect, it is only when I come in the next day that I can not connect without booting XP first.

Anyway, I used the first part of your thread and tried to connect without booting XP first and it connected. It maybe a fluke so I will try a few more times before saying it works. Being that the network allows for connections for long periods of time after original connection I can not truely have tested it. If it turns out that it works I would be happy to submit the information to the school so that others at our school can use linux on our wireless network.

I have network manager conrtolling my connections and it seems to work well. I do not have to add the extra on this thread about being on different networks. If the network is there, it connects.

I want to say thanks for the information and I am excited to see if it connects tommorrow.

THANKS

It would be neat if someone would explain why switching os would leave a availble connection.
randomnumber is offline   Reply With Quote
Old October 13th, 2006   #6
randomnumber
A Carafe of Ubuntu
 
randomnumber's Avatar
 
Join Date: Oct 2006
Location: Pensacola, FL
Beans: 135
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

I tried the connection setup and it works half way. The config file does not seem to work. It could be that I error ed in setting up the config file. I have found that I can get a connection using network-manager that can be added to your system. It is not the manager that ubuntu uses as default, you have to add network-manager and disable the connections through the default manager so that this application can access the network card. If you do not disable the network card, network-manger will not be able to use/see the network card.

I connect to the network by:
1.click the network-manager icon
2.select “Connect to Other Wireless Network..”
3.change “Wireless Security:” to “WPA Enterprise”
This expands the menu to have more options
4.type network name, example “uwf-argo-air”
5.change “EAP method” to “PEAP”
6.change “Key Type:” to “Dynamic WEP”
7.type user id in “Identity”, UWF sail lab I.D.
8.type user password in “Password”, UWF sail Lab password
9.Then connect.

Network Manager appears to be using wpa_supplicant. If you are interested In seeing information from wpa_supplicant while connecting you can install and run wpa_gui. These applications are run as root so you would to type sudo wpa_gui to get it to work.

I hope this is a process that really works. I will continue to test the connection to see if it is a fluke of success.

Thanks everyone.

a nice page and has how to install network-manager
http://ubuntuguide.org/wiki/Dapper#H...etwork-Manager
randomnumber is offline   Reply With Quote
Old October 17th, 2006   #7
ubuntu_demon
Ubuntu Master Roaster
 
ubuntu_demon's Avatar
 
Join Date: Oct 2004
Location: Netherlands
Beans: 2,968
Ubuntu 8.04 Hardy Heron
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

I'm having problems connecting to wireless university network (PEAP,WEP)
http://ubuntuforums.org/showthread.php?t=278603

Thanks for taking a look
__________________
my blog : http://ubuntudemon.wordpress.com

Feisty/Gutsy/Hardy Quick Guide (including multimedia playback)
http://ubuntuforums.org/showthread.php?t=567507


Ubuntu Customization Guide
http://www.ubuntuforums.org/forumdisplay.php?f=159
ubuntu_demon is offline   Reply With Quote
Old January 9th, 2007   #8
halfdan.k
First Cup of Ubuntu
 
halfdan.k's Avatar
 
Join Date: Nov 2006
Location: Copenhagen
My beans are hidden!
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

A fairly good and graphical guide to dapper 6.06 and a (common) uni wifi wep/peap 802.1x network...made my day

http://www.sai.uio.no/it/oppkobling/...linux-eng.html
halfdan.k is offline   Reply With Quote
Old March 2nd, 2007   #9
dennis.groome
5 Cups of Ubuntu
 
Join Date: Jan 2007
Location: New Orleans
Beans: 18
Ubuntu 6.10 Edgy
Send a message via AIM to dennis.groome Send a message via Yahoo to dennis.groome
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

There's lots of great information in this thread. I have a similar problem, but I'm trying to get a connection to a wired network over ethernet using PEAP-MSCHAPv2 and 802.1x. Can these configurations be adapted to use a wired NIC on eth0? What needs to be changed?
dennis.groome is offline   Reply With Quote
Old March 19th, 2007   #10
staticsage
Just Give Me the Beans!
 
Join Date: Jul 2005
Beans: 68
Re: HOWTO: ipw3945 connecting to a University Network (802.1x / PEAP)

Quote:
Originally Posted by dennis.groome View Post
There's lots of great information in this thread. I have a similar problem, but I'm trying to get a connection to a wired network over ethernet using PEAP-MSCHAPv2 and 802.1x. Can these configurations be adapted to use a wired NIC on eth0? What needs to be changed?
I'm facing the same problem. Anyone know where to start with this?
staticsage is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:52 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry