Status
Niet open voor verdere reacties.
F

fireblade

Gast
weet ik iemand hoe ik wpa kan instaleren op linux ?
is ubuntu versie
 

vdalex

Medewerker
Forumleiding
How_to WPA onder Linux

How_to WPA onder Linux

How_to WPA onder Linux
[ Pieter Lenaerts ]
Vooronderstellingen

Deze gids gaat er van uit dat u volgende administratieve taken kan uitvoeren op uw systeem:

* pakketten installeren en verwijderen van uw systeem,
* als root bestanden aanmaken en bewerken,
* verbinden met UA-public,
* zonodig de kernel configureren, compileren en installeren.

U heeft ook volgende pakketten heeft nodig:

* wpa_supplicant:
* wifi-radar, indien U kiest voor een GUI oplossing.

Uw systeem moet in staat zijn connectie te maken met onbeveiligde draadloze netwerken. U kan dit testen door aan te melden op het UA-public netwerk.

Indien U niet kan verbinden met het UA-public netwerk dient U de aanwijzingen van uw distributie te volgen om verbindingen te maken met draadloze netwerken.
Configuratie van de kernel

Volgende kernel modules zijn noodzakelijk om te verbinden met de draadloze netwerken op de UA-campus:

* AES encryptie algoritme voor het AES netwerk (geniet absolute voorkeur!!),
* Michael MIC encryptie algoritme voor het TKIP netwerk,
* DES encryptie algoritme voor het DWEP netwerk.

U kan uw kernel op deze kenmerken controleren door volgende opdrachten uit te voeren in de terminal (antwoord moet steeds 'y' of 'm' zijn):

* $ grep CRYPTO_AES /boot/config
* $ grep CRYPTO_MICHAEL_MIC /boot/config
* $ grep CRYPTO_DES

Indien een van deze algoritmes niet voorzien is in de kernel kan U ervoor kiezen niet aan te melden op het respectievelijke netwerk. Zoniet moet U Uw kernel hercompileren met de gewenste encryptiemodule erin. Deze HOWTO gaat ervan uit dat U voor het AES netwerk gaat. Anders vervangt U gewoon overal AES door TKIP.

Vanzelfsprekend moeten de modules geladen zijn.
Configuratie van wpa_supplicant

De draadloze netwerken op de UA campus maken gebruik van WPA-EAP keymanagement protocol. In de eerste fase van de onderhandeling wordt PEAP protocol gebruikt, in de tweede fase van MSCHAPV2 waarbij u uw login en paswoord moet verschaffen.

Dit resulteert in de volgende configuratie voor wpa_supplicant:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=users
network={
ssid="UA-aes"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="uw-login"
password="uw-paswoord"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}

Indien U wpa_supplicant voor een ander netwerk dan de UA netwerken wil configureren moet U zich informeren bij de network-administrator naar alle gebruikte protocollen op keymanagement-, authenticatie- en onderhandelingsniveau voor elke fase.
Bash-script

Deze sectie bespreekt de verschillende stappen die U manueel of via het bash-script kan uitvoeren om U aan te loggen op het AES netwerk. Als de terminal U afschrikt gaat U beter naar de volgende sectie over wifi-radar.

U moet ook <eth1> vervangen door de juiste naam van uw draadloze interface. $ iwconfig zal die weergeven. Ten slotte moet U <wext> vervangen door 'ipw' indien U een Intel wifi kaart heeft.

UA_aes_connect:


#!/bin/bash

if [ "$UID" -gt 0 ]; then
echo "Enter the root password, please."
su -c "$0 $@" root
exit 0
else
dhcpcd -k eth1 &&
iwconfig eth1 essid UA-aes enc 000000000 mode managed &&
ifconfig eth1 allmulti up &&
wpa_supplicant -c /etc/wpa_supplicant.conf.aes -i eth1 -D wext -B &&
dhcpcd eth1
fi

Bespreking stap voor stap:

1. De test construct controleert of U root bent. Zoniet roept het script zichzelf aan via su.
2. Het script stopt mogelijk actieve DHCP clients.
3. iwconfig wordt ingesteld op AES netwerk met een bogus-key.
4. de interface wordt geactiveerd. (dit is niet nodig voor elk systeem)
5. wpa_supplicant wordt naar de achtergrond opgeroepen met de aes configuratiefile, interface en driver.
6. de DHCP client wordt opgestart voor de interface.

Hier moeten nog aanpassingen gebeuren om te detecteren welke dhcp client op het systeem van de gebruiker is geïnstalleerd, en eventueel welke interface de wireless kaart is.
Configuratie van wifi-radar
De configuratie van wifi-radar bestaat uit 3 stappen:

1. Maak een profiel aan voor UA-aes,
2. in het WPA menu duidt U de juiste driver aan,
3. in het connection commands menu zet U bij before:

wpa_supplicant -c /etc/wpa_supplicant.conf.aes -i <interface> -D <driver> -B

4. bij after vult U in: wpa_cli terminate
 

vdalex

Medewerker
Forumleiding
network manager voor Ubuntu

network manager voor Ubuntu

Met deze install code kan je in uw terminal of je konsole de networkmanager installeren


sudo apt-get install network-manager-gnome


en deze code is voor Kubuntu

sudo apt-get install knetworkmanager
 

vdalex

Medewerker
Forumleiding
set up voor sources.list

set up voor sources.list

Set up
[edit]
Downloading required tools

First thing's first, you need the Universe repository enabled. If you haven't done this yet, see here: https://wiki.ubuntu.com/MOTU/Packages?action=show&redirect=UniversePackages Also, make sure that the src universe repository is enabled too. The failsafe method of checking is opening the /etc/apt/sources.list by typing:
file.pngCode:

sudo gedit /etc/apt/sources.list


Mine looks like this:
file.png File:/etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse


If I recall correctly, the default file is more ornate, but this gets the job done. Specifically what you're looking for is a line somewhere with "deb http://archive.ubuntu.com/ubuntu/ dapper" and the word "universe" after it on the same line and a line "deb-src http://archive.ubuntu.com/ubuntu/ dapper" with the word "universe" after it on the same line. Also, of course, these lines must be uncommented too (no # at the beginning).

This HOWTO also assumes that you've created a "wpa" directory in your home directory, i.e. that you type in at a console:
file.pngCode:

mkdir ~/wpa


Let's get some nice compiling tools and headers if we don't already have them. Open up a console and type:
file.pngCode:

sudo apt-get install build-essential gcc-3.4 linux-headers-$(uname -r) cvs subversion automake1.9


While we are at it, it's also a good idea to install the linux-headers meta-package that is appropriate for our platform so that we will always have the correct linux-headers installed even when kernel updates are released. In a console, type:
file.pngCode:

uname -r


It should output something like:
file.pngCode:

2.6.15-14-686


The part at the end, the "686" (or whatever it says) is your platform. So in Synaptic or another another tool, look for the linux-headers meta-package that is best suited for your platform. In my case, this was "linux-headers-686". Notice how this package does not have any specific version number in the name, because it always "depends" on the latest linux-headers version available.
[edit]
Updating the ieee80211 subsystem

First we have to update the ieee80211 subsystem before the latest IPW drivers will compile or work.

Download the archive ieee80211-1.1.12.tgz to your ~/wpa directory:

Start a console and enter:
file.pngCode:

cd ~/wpa tar -zxvf ieee80211-1.1.12.tgz cd ieee80211-1.1.12 sudo sh remove-old sudo rm -rf /lib/modules/$(uname -r)/kernel/net/ieee80211 sudo rm -rf /usr/src/linux-headers-$(uname -r)/include/net/ieee80211* sudo rm -rf /usr/src/linux-headers-$(uname -r)/include/config/ieee80211* make sudo make install


(The rm commands remove the old headers and modules that would otherwise prevent ieee80211 from compiling or working.)

Hopefully that went well. Now we can update to the latest drivers.

If you have an IPW2100, IPW2200 or IPW2915 chipset, keep scrolling down until you see the section for that.
[edit]
IPW2100 chipset

Download the archive ipw2100-1.2.1.tgz to your ~/wpa directory:

Start a console and enter:
file.pngCode:

cd ~/wpa tar -zxvf ipw2100-1.2.1.tgz cd ipw2100-1.2.1 sudo sh remove-old make sudo make install


Great, if there's no errors, you've got the newest drivers installed with the patch.
[edit]
IPW2200 or IPW2915 chipset

Download the archive ipw2200-1.1.1.tgz to your ~/wpa directory:

Start a console and enter:
file.pngCode:

cd ~/wpa tar -zxvf ipw2200-1.1.1.tgz cd ipw2200-1.1.1 sudo sh remove-old make sudo make install


Great, if there are no errors, you've got the newest drivers installed with the patch.
[edit]
A note for everyone

This is a good time to add that you'll need to reinstall the ieee80211 subsystem and the latest ipw drivers whenever you update kernels, even for kernel security updates through apt-get! If not, from my experience, your pre-configured WPA networks will continue to work with NetworkManager, but you won't be able to connect to new WPA networks. This is because NetworkManager doesn't seem to check your drivers for WPA support for preferred networks, only for new networks. It just so happens that the latest Dapper drivers already have the right WPA support, but they just don't advertise it, so your preferred networks will continue working fine, but you won't have a WPA option available when you try to connect to a new network until you reinstall ieee80211 and your IPW drivers. Keep this in mind the next time you see a reboot notification from a kernel update! (If there's a way to get around this, please reply!)


[edit]
Installing latest libnl from svn

In the console:
file.pngCode:

cd ~/wpa svn co https://svn.suug.ch/repos/tgr/libnl cd libnl ./configure make sudo make install sudo mkdir -p /usr/local/lib/pkgconfig sudo cp libnl-1.pc /usr/local/lib/pkgconfig/


Helloyzc
[edit]
Installing latest NetworkManager from cvs

First thing's first. Uninstall the network-manager package using apt-get or Synaptic if it's currently installed.

Now let's download the latest NetworkManager from cvs:
file.pngCode:

sudo apt-get build-dep network-manager sudo apt-get install dhcdbd libnotify-dev cd ~/wpa cvs -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login cvs -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co NetworkManager cd NetworkManager gedit configure.in


By default, the compiler is set to treat warnings as errors. Unfortunately, there will be warnings, so we want to disable this setting. Press ctrl+f and search for Werror to find the line that looks like this:
file.png File:configure.in

CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"


...and remove "-Werror " such that it looks like this:
file.png File:configure.in

CFLAGS="-Wall -std=gnu89 $CFLAGS"


Save and close.

We have to edit another file:
file.pngCode:

gedit initscript/Debian/NetworkManager


And find where it (for some reason) says:
file.png File:initscript/Debian/NetworkManager

DAEMON=/usr/sbin/$NAME


And change it to read:
file.png File:initscript/Debian/NetworkManager

DAEMON=/usr/local/sbin/$NAME


Now we have to make just one more config change to get the applet to work properly:
file.pngCode:

gedit gnome/applet/nm-applet.conf


Add this in there (just below the <policy user="root">...</policy> block is a nice place):
file.png File:gnome/applet/nm-applet.conf

<policy user="YOURUSERNAME"> <allow own="org.freedesktop.NetworkManager"/> <allow send_destination="org.freedesktop.NetworkManager"/> <allow send_interface="org.freedesktop.NetworkManager"/> </policy>


(Be sure to replace YOURUSERNAME with your actual user name.) Save and close. Now do the exact same thing to this file:
file.pngCode:

gedit src/NetworkManager.conf


Save and close.

If you don't do the above, then you'll probably get dbus security errors when you try to run nm-applet.

Now let's (automake1.7 required)
file.pngCode:

./autogen.sh make sudo make install


Now we have to do some system-specific stuff that the CVS version doesn't install by default:
file.pngCode:

sudo cp src/NetworkManager.conf /etc/dbus-1/system.d/ sudo cp gnome/applet/nm-applet.conf /etc/dbus-1/system.d/ sudo cp initscript/Debian/NetworkManager /etc/init.d/ sudo update-rc.d -f NetworkManager remove sudo update-rc.d NetworkManager start 30 2 3 4 5 . stop 70 0 1 6 . gtk-update-icon-cache -f /usr/share/icons/hicolor/


Hopefully that went well. Now there's a few dozen different services and drivers we could restart to get this working without rebooting, but let's just reboot instead.
[edit]
Conclusion

When Ubuntu comes up, try running nm-applet from the console. You will have an icon in the notification area, and you should be able to use it to see and connect to WPA networks! If this is working properly, add it to the startup by going to the System menu on the gnome panel, Preferences, then Sessions. Go to the Startup Programs tab, and add nm-applet. Now the NetworkManager applet will start up automatically!

If it's not working properly and you want to further debug the problem, you can try this:
file.pngCode:

sudo killall NetworkManager sudo NetworkManager --no-daemon


sudo /etc/init.d/dbus restart ...also works to restart all of the related daemons.

... as this will give you command line output, for example, as to what's going on on the network side of things, since nm-applet will just return applet errors.

Phew! It's over now! Hopefully you're now enjoying your newfound WPA support and not reinstalling Ubuntu!
Retrieved from "http://doc.gwos.org/index.php/Network_Manager_with_WPA"

Categories: Dapper | Networking | Wireless
Views

* Article
* Discussion
* Edit
* History

Personal tools

* Create an account or log in

Navigation

* Main Page
* Community portal
* Current events
* Recent changes
* Random page
* Help
* Donations

Search

Toolbox

* What links here
* Related changes
* Special pages
* Printable version

MediaWiki

* This page was last modified 09:23, 9 January 2007.
* This page has been accessed 35,401 times.
* About Ubuntu Document Storage Facility
* Disclaimers
 

vdalex

Medewerker
Forumleiding
kijk eens even via synaptic pakketbeheer en daar moet je de vakjes aanvinken van niet ondersteunde en commerciele software vervolgens wifi intikken en of wireless
 
F

fireblade

Gast
ik heb de laptop met linux eens aangesloten aan de kabel en
ik geraak dus in m'n router maar als ik dan probeer met firefox op het internet te geraken lukt het niet :s
 

vdalex

Medewerker
Forumleiding
Procedure to enable WPA Wireless in Ubuntu

To update the source list run the following command

sudo apt-get

sudo apt-get install wpasupplicant

sudo apt-get install network-manager-gnome network-manager

sudo gedit /etc/network/interfaces

Comment out everything other than “lo” entries in that file and save the file

Create a file called /etc/default/wpasupplicant, add entry ENABLED=0 and save the file

sudo touch /etc/default/wpasupplicant

Reboot your system or use the following command

sudo /etc/init.d/dbus restart

Once you login back in to your machine you need to left-click the network manager icon in Gnome and select your wireless network It should prompts for password, type, etc and It will ask you to choose a password for your new “keyring”.

After enterring all the details my wireless network was connected and working fine you can see in the follwoing screen
 
F

fireblade

Gast
hoe maak je zo een file (Create a file called /etc/default/wpasupplicant, add entry ENABLED=0 and save the file)en hoe comment je die andere uit ?
sorry nog geen tijd gehad voor linux (op)
 
Status
Niet open voor verdere reacties.
Bovenaan Onderaan