WPA PSK unter Debian Sarge Stable
HARDWARE:
in meinem fall wireless router WGU624 und PCI wlan karte WG311T von Netgear
Konfigurationen am wireless router:
- SSID (essid) erstellen
- a and g only enabled
- Security mode: WPA-PSK
- Cipher Type: TKIP
- WPA key erstellen
- SSID Broadcast disabled
es geht los:
1.) überprüfe den kernel
debian:/# uname -a Linux debian 2.6.8-2-686 #1 Tue Aug 16 13:22:48 UTC 2005 i686 GNU/Linux
2.) installiere kernel-headers passend zu deinem kernel
bei einer anderen distro einfach kernel-source
# apt-cache search kernel-headers # apt-get install kernel-headers-...
3.) installiere wireless-tools
# apt-get install wireless-tools
4.) finde heraus chipsatz von deiner wlan karte (Das ist sehr wichtig!)
5.) downloade und kompiliere den entsprechenden treiber. installiere bitte auf keinen fall einfach blind irgendeinen treiber ! 90 % der wireless installationen scheitert an einem falschen treiber.
in meinem fall für Atheros nehme ich madwifi-ng treiber
# apt-get install subversion # cd /usr/src # svn checkout http://svn.madwifi.org/trunk madwifi-ng # cd madwifi-ng # make clean # make # make install
6.) wpa_supplicant von der repository entfernen:
# apt-get remove --purge wpa_supplicant
wpasupplicant von der repository im zusammenhang mit madwifi funktionierte nicht!bei opensuse 10.0 der mitgelieferte wpasupplicant funktionierte ebenfalls nicht,also deinstallieren. neusten wpa_supplicant von http://hostap.epitest.fi/wpa_supplicant/
downloaden, entpacken, anpassen und installieren:
# cd wpa_supplicant-0.4.8<br>
für madwifi mit dem lieblings editor .config erstellen und folgendes hinfügen:
# vi .config CONFIG_DRIVER_MADWIFI=y CFLAGS += -I/usr/src/madwifi-ng CONFIG_CTRL_IFACE=y
verwendet man statt madwifi z.B ndiswrapper, dann sollte man folgendes eintragen:
CONFIG_DRIVER_WEXT=y CONFIG_CTRL_IFACE=y
der pfad zu madwifi-ng unbedingt anpassen !
# make clean # make # make install # cp wpa_supplicant.conf /etc/wpa_supplicant.conf
wpasupplicant von der repository im zusammenhang mit madwifi funktionierte nicht !
7.) restarten und checken, ob treiber geladen wurde
# lsmod | grep ath
ath_pci 97348 0
ath_rate_sample 12768 1 ath_pci
wlan 195420 5 wlan_tkip,wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 189104 3 ath_pci,ath_rate_sample
# ifconfig -a
ath0 Protokoll:Ethernet Hardware Adresse 00:0F:B5:26:C2:D8
inet6 Adresse: fe80::20f:b5ff:fe26:c2d8/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
8.) passphrase kreieren
# which wpa_passphrase
/usr/local/sbin/wpa_passphrase
# wpa_passphrase myessid meinegeheimepassphrase
network={
ssid="myessid"
#psk="meinegeheimepassphrase"
psk=6f115e30ef7e7eb6c253033709e8864e43894e3df2159f00b99150d69113439a
}
passphrase (WPA key) muss 8-63 zeichen haben.
alle beispiele (Example blocks) in /etc/wpa_supplicant.conf löschen,
anpassen und das ergebnis von wpa_passphrase mit copy paste hinzufügen
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 eapol_version=1 ap_scan=1 fast_reauth=1
# Example blocks:
# WPA-PSK
network={
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
ssid="myessid"
psk=ae7b5d1f4c1d8a80a6be859a45905aa7024fd6fcda4403a43b2cc0926f59f8c0
priority=2
}
falls nicht funktionieren sollte, man kann auch mit ap_scan=2 probieren
9.)
# chmod 600 /etc/wpa_supplicant.conf
10.) testen und ewentuell driver madwifi ersetzen, falls kein madwifi:
/usr/local/sbin/wpa_supplicant -dd -K -t -i ath0 -D madwifi -c /etc/wpa_supplicant.conf
oder
# which wpa_supplicant /usr/local/sbin/wpa_supplicant # /usr/local/sbin/wpa_supplicant -dd -K -t -i ath0 -D madwifi -c /etc/wpa_supplicant.conf
es sollte ungefähr sowas ausspucken
Sep 07 01:19:50.448092: WPA: Group Key - hexdump(len=32): ef 1c 27 8d ee be f5 6d ad 32 c4 d7 5c 6a 1f e0 a2 44 b3 22 45 b5 8e 25 77 e2 ac 4f 7d 70 33 d7 Sep 07 01:19:50.448113: WPA: Installing GTK to the driver (keyidx=1 tx=0). Sep 07 01:19:50.448125: WPA: RSC - hexdump(len=6): 00 00 00 00 00 00 Sep 07 01:19:50.448139: wpa_driver_madwifi_set_key: alg=TKIP key_idx=1 set_tx=0 seq_len=6 key_len=32 Sep 07 01:19:50.448229: WPA: Sending EAPOL-Key 2/2 Sep 07 01:19:50.448247: WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5d fe 03 11 00 30 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 82 74 19 76 03 56 8a f4 ac 9c 35 c3 24 ac 2b 00 00 Sep 07 01:19:50.448488: WPA: Key negotiation completed with 00:0f:b5:3b:e7:d8 [PTK=TKIP GTK=TKIP] Sep 07 01:19:50.448507: Cancelling authentication timeout Sep 07 01:19:50.448522: Removed BSSID 00:0f:b5:3b:e7:d8 from blacklist Sep 07 01:19:50.448536: State: GROUP_HANDSHAKE -> COMPLETED Sep 07 01:19:50.448549: CTRL-EVENT-CONNECTED - Connection to 00:0f:b5:3b:e7:d8 completed (reauth)
State: GROUP_HANDSHAKE -> COMPLETEDist sehr wichtig !
11.) falls nicht geht, nochmals alle punkte genau durchchecken und nicht aufgeben
ich werde noch startup scripte posten
p.s
übrigens diese installation funktionierte auch bei opensuse 10.0 und ubuntu dapper drake.
viel spass
christoph




