.dsy:it. Pages (6): « First ... « 2 3 4 5 [6]
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- [wireless] come si fa?? (http://www.dsy.it/forum/showthread.php?threadid=14164)


Posted by DeepBlue on 18-03-2005 16:48:

WiFi + WPA tutorial

Ecco come promesso, tutti i passi da seguire :)

Ecco un (non molto) breve tutorial su come installare WPA supplicant, ndiswrapper e far funzionare una broadcom BCM94306 su Slackware 10 (ma sono sicuro che ve lo potete rivendere anche su altre distro e con schede che funzionano con ndiswrapper).

Prerequisiti:
- wireless-tools presenti [http://www.hpl.hp.com/personal/Jean...inux/Tools.html]
- ndiswrapper (solo per schede sprovviste di driver per linux) installati [http://ndiswrapper.sourceforge.net/...hp/Installation]


Installazione WPA supplicant
Scaricare il pacchetto da http://hostap.epitest.fi/wpa_supplicant/
Creare un .config secondo quanto riportato nel README
ATTENZIONE: quasi sicuramente si dovrà installare pcspc-lite poiché è richiesto winscard.h (per chi ha slackware, tgz disponibile attraverso swaret).

Ecco il mio:


#Following build time configuration options are used to control IEEE
#802.1X/EAPOL and EAP state machines and all EAP methods. Including
#TLS, PEAP, or TTLS will require linking wpa_supplicant with openssl
#library for TLS implementation.

CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_LEAP=y

#Following option can be used to include GSM SIM/USIM interface for GSM
#authentication algorithm (for EAP-SIM). This requires pcsc-lite
#(http://www.linuxnet.com/) for smart card access.
#interfaces are included. Prism54.org driver is not yet complete and
#Hermes driver interface needs to be downloaded from Agere (see above).
#Most Linux driver need to include CONFIG_WIRELESS_EXTENSION.

CONFIG_WIRELESS_EXTENSION=y
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_PRISM54=y
#CONFIG_DRIVER_HERMES=y
#CONFIG_DRIVER_MADWIFI=y
#CONFIG_DRIVER_ATMEL=y
#CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NDISWRAPPER=y
#CONFIG_DRIVER_IPW2100=y

#Following example includes all features and driver interfaces that are
#included in the wpa_supplicant package:

CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_PRISM54=y
#CONFIG_DRIVER_HERMES=y
#CONFIG_DRIVER_MADWIFI=y
#CONFIG_DRIVER_ATMEL=y
#CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NDISWRAPPER=y
#CONFIG_DRIVER_IPW2100=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_LEAP=y
CONFIG_PCSC=y

#EAP-PEAP and EAP-TTLS will automatically include configured EAP
#methods (MD5, OTP, GTC, MSCHAPV2) for inner authentication selection.
CONFIG_PCSC=y


Sicuramente, per chi usa ndiswrapper, la parte che riguarda HOSTAP e PRISM54 può essere eliminata. Io le avevo incluse in fase di debug ma non ho ancora testato il funzionamento dell'autenticazione senza questi driver.

Una volta creato il file .config potete dare make e installare i binari semplicemente copiandoli in /usr/local/bin (# cp wpa_cli wpa_supplicant /usr/local/bin).
Questo è quanto per l'installazione di WPA. Maggiori informazioni nel Readme :)


A questo punto assicuratevi che in /etc/rc.d/rc.wireless.conf ci sia la riga “WPA=y”, altrimenti non riuscirete mai ad autenticarvi sulle reti protette dall'omonimo protocollo.
Se non ci fosse, aggiungetela.


Prima di cercare di collegarvi alla rete wi-fi, se questa è protetta da WPA, dovete scrivere un file di configurazione per wpa_supplicant, che potete inserire sotto /etc.
Per quanto riguarda la rete presso il dipartimento, il suddetto file avrà questo aspetto:
network={
ssid="DSI-DICO"
scan_ssid=0
proto=WPA RSN
key_mgmt=WPA-EAP IEEE8021X NONE
pairwise=CCMP TKIP
eap=TTLS PEAP TLS
group=CCMP TKIP WEP104 WEP40
identity="vostra_login_in_SiLAB"
password="password_della_vostra_registrazione_al_servizio"
}



Inizializzate quindi la scheda con

# /etc/rc.d/rc.wireless wlan0


In fase di debug vi consiglio di lanciare wpa_cli, che altro non è che un monitor su quello che fa wpa_supplicant.

Lanciato quindi wpa_client (da root), aprite un'altra shell (sempre come root) e lanciate il seguente comando:

# wpa_supplicant -d -iwlan0 -c/etc/wpa_dsi.conf -Dndiswrapper
(per maggiori info leggete il readme di wpa).

Nelle due finestre cominceranno a scorrere righe con le informazioni scambiate fra l'AP e la scheda wifi.
In particolare, in quella di wpa_supplicant vedrete ad un certo punto:
<2>Associated with 00:0d:88:c1:b4:f8
<2>WPA: Key negotiation completed with 00:0d:88:c1:b4:f8


e se provate a digitare status nella finestra di wpa_client, dovreste vedere qualcosa di questo tipo:

bssid=00:0d:88:c1:b4:f8
ssid=DSI-DICO
pairwise_cipher=TKIP
group_cipher=TKIP
key_mgmt=WPA/IEEE 802.1X/EAP
wpa_state=COMPLETED
Supplicant PAE state=AUTHENTICATED
heldPeriod=60
authPeriod=30
startPeriod=30
maxStart=3
suppPortStatus=Authorized
portControl=Auto
Supplicant Backend state=IDLE
EAP state=SUCCESS
reqMethod=0
selectedMethod=21
methodState=DONE
decision=UNCOND_SUCC
ClientTimeout=60


Significa che l'autenticazione ha avuto successo :)

A questo punto bisogna farsi assegnare un ip (ovviamente solo per le reti con dhcp attivo).

In questo ho incontrato qualche difficoltà, perché la scheda non ne voleva sapere di mandare correttamente in broadcast la richiesta di un lease.
Per fortuna il problema era piuttosto stupido ( :sbonk: ): è stato sufficiente assegnare localhost alla scheda e poi chiedere il lease. Procedete così:

# ifconfig wlan0 127.0.0.1 netmask 255.255.255.0 broadcast 255.255.255.255 promisc

# dhcpcd wlan0


e magicamente potrete navigare con la scheda wireless ;)


Troubleshooting

Se non riuscite a navigare:

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~


Posted by recoil on 09-05-2005 15:06:

finalmente funziona anche a me! :)
per chi ha centrino come me controllate di avere:
ipw2200 versione 1.0.3
wpa_supplicant versione 0.3.8

io con versioni precedenti non riuscivo a collegarmi...
cmq ci mette una trentina di secondi, forse di più. ma alla fine funziona, l'importante è quello

come file di configurazione ho usato questo che credo sia molto simile se non identico a quello di DeepBlue

code:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 eapol_version=1 ap_scan=1 network={ ssid="DSI-DICO" scan_ssid=0 proto=WPA RSN key_mgmt=WPA-EAP IEEE8021X NONE pairwise=CCMP TKIP group=CCMP TKIP WEP104 WEP40 eap=TTLS PEAP TLS #anonymous_identity="anonymous" #phase2="autheap=CHAP" identity="username" password="" }

__________________
Sono sempre alla ricerca di curriculum interessanti da segnalare alle società con cui ho contatti. Info in pm


Posted by DeepBlue on 09-05-2005 15:12:

Direi che si potrebbe mettere tutto in una sezione how-to :)

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~


Posted by BillGates on 16-07-2005 09:43:

Ho provato a configurare le connessione wireless sotto linux come spiegato in precedenza ma ottengo questo risultato:

code:
Initializing interface 'eth2' conf '(null)' driver 'default' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' ctrl_interface='/var/run/wpa_supplicant' ctrl_interface_group=0 eapol_version=1 ap_scan=1 fast_reauth=1 Priority group 5 id=0 ssid='DSI-DICO' Initializing interface (2) 'eth2' EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: KEY_RX entering state NO_KEY_RECEIVE EAPOL: SUPP_BE entering state INITIALIZE EAP: EAP entering state DISABLED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 Own MAC address: 00:0e:35:40:59:01 wpa_driver_hostap_set_wpa: enabled=1 wpa_driver_hostap_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0 Failed to set encryption. wpa_driver_hostap_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0 Failed to set encryption. wpa_driver_hostap_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0 Failed to set encryption. wpa_driver_hostap_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0 Failed to set encryption. wpa_driver_hostap_set_countermeasures: enabled=0 wpa_driver_hostap_set_drop_unencrypted: enabled=1 Setting scan request: 0 sec 100000 usec Wireless event: cmd=0x8b06 len=8 RTM_NEWLINK, IFLA_IFNAME: Interface 'eth2' added RTM_NEWLINK, IFLA_IFNAME: Interface 'eth2' added State: DISCONNECTED -> SCANNING Starting AP scan (broadcast SSID) Scan timeout - try to get results Received 1861 bytes of scan results (9 BSSes) Scan results: 9 Selecting BSS from priority group 5 0: 00:0d:88:c1:a6:84 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 1: 00:0d:88:c1:b9:28 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 2: 00:0d:88:c1:bc:8f ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 3: 00:0d:88:c1:ae:20 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 4: 00:0d:88:c1:b9:48 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 5: 00:0d:88:c1:b4:f8 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 6: 00:40:05:31:db:12 ssid='AINet' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 7: 00:0d:88:c1:aa:42 ssid='DSI-DICO' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE 8: 00:0d:88:c1:a8:d9 ssid='vpn' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 skip - no WPA/RSN IE No suitable AP found. Setting scan request: 5 sec 0 usec Starting AP scan (broadcast SSID) CTRL-EVENT-TERMINATING - signal 2 received State: SCANNING -> DISCONNECTED No keys have been configured - skip key clearing EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 wpa_driver_hostap_set_wpa: enabled=0 wpa_driver_hostap_set_drop_unencrypted: enabled=0 wpa_driver_hostap_set_countermeasures: enabled=0


Uso ipw2200 (centrino).

L'unica differenza rispetto a quanto spiegato sopra è che nn ho nessun file /etc/rc.d/wireless.conf dove inserire wpa="y" !!

sotto /etc/ ho directory del tipo rc0.d rc1.d etc. etc. ma nessuna contiene wireless.conf...

potete aiutarmi?


Posted by DeepBlue on 16-07-2005 10:43:

Suppongo che tu stia usando una distro red hat based.
Probabilmente, dopo aver installato i driver per la scheda wireless, troverai sotto /etc/sysconfig/network-scripts/ un file che si chiama ifcfg-eth2. Prova ad aggiungere WPA="y" li dentro.

Assicurati anche che i driver che stai usando siano gli ultimi rilasciati. Eventualmente prova a fare un downgrade e/o un upgrade.

Fai sapere come va a finire!

Considera inoltre che potrebbe funzionare tutto, visto che nel log che hai riportato c'è scritto: No suitable AP found.

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~


Posted by BillGates on 17-07-2005 19:16:

La distribuzione che uso è basata su debian e il file ifcfg-eth2 proprio non ce l'ho (la drectory /etc/sysconfig/network-scripts/ è vuota...)

La scritta "No suitable AP found." invece indica che tra gli access point trovati (DSI-DICO) nn ce n'è nessuno al quale possa collegarsi x via del WPA...

aiuto!! come attivo wpa in debian?

__________________
L'Italia agli Italiani!


Posted by DeepBlue on 17-07-2005 20:10:

Prova a guardare /etc/init.d/networking

Purtroppo io scheda e autenticazione li ho fatti andare su slackware, quindi non posso aiutarti più di tanto.

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~


Posted by BillGates on 18-07-2005 08:56:

sono riuscito ad autenticarmi, il problema era nella string di avvio di wpa_supplicant (sostituivo -D con -d...)

L'ip lo ottengo tramite pump

pump -i eth2

e funzia alla grande! che fatica, ma alla fine ce l'ho fatta!!
(se dovessi rifarlo sarei spacciato)

__________________
L'Italia agli Italiani!


All times are GMT. The time now is 13:13. Pages (6): « First ... « 2 3 4 5 [6]
Show all 83 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.