Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Community > Tech > [wireless] come si fa??
Pages (6): « First ... « 2 3 4 5 [6]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.52 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
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:

  • controllate /etc/resolv.conf
    Se il file è vuoto, dovete inserire l'ip di un server dns, altrimenti potete scordarvi la risoluzione dei nomi!
  • controllate la tabella di routing (man route).
    Se la scheda wireless non è il default gateway, impostatela come tale! (man route).
  • controllate la presenza del segnale e il funzionamento della scheda o dell'AP dando
    # iwlist wlan0 scan
    Se c'è un AP attivo e funzionante, dovrebbero apparire i suoi dati.

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

Last edited by DeepBlue on 18-03-2005 at 16:55

18-03-2005 16:48
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
recoil
dsy adminz

User info:
Registered: Mar 2002
Posts: 4454 (0.51 al dì)
Location: Milano / Erba
Corso: TICOM
Anno: laureato
Time Online: 61 Days, 16:17:45 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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

09-05-2005 15:06
Click Here to See the Profile for recoil Click here to Send recoil a Private Message Visit recoil's homepage! Find more posts by recoil Add recoil to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.52 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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

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

09-05-2005 15:12
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
BillGates
.illuminato.

User info:
Registered: Apr 2005
Posts: 165 (0.02 al dì)
Location: Manchester
Corso: Working
Anno:
Time Online: 1 Day, 7:32:26 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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?

16-07-2005 09:43
Click Here to See the Profile for BillGates Click here to Send BillGates a Private Message Find more posts by BillGates Add BillGates to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.52 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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! ~

Last edited by DeepBlue on 16-07-2005 at 15:38

16-07-2005 10:43
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
BillGates
.illuminato.

User info:
Registered: Apr 2005
Posts: 165 (0.02 al dì)
Location: Manchester
Corso: Working
Anno:
Time Online: 1 Day, 7:32:26 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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!

17-07-2005 19:16
Click Here to See the Profile for BillGates Click here to Send BillGates a Private Message Find more posts by BillGates Add BillGates to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.52 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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! ~

17-07-2005 20:10
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
BillGates
.illuminato.

User info:
Registered: Apr 2005
Posts: 165 (0.02 al dì)
Location: Manchester
Corso: Working
Anno:
Time Online: 1 Day, 7:32:26 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

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!

Last edited by BillGates on 18-07-2005 at 09:24

18-07-2005 08:56
Click Here to See the Profile for BillGates Click here to Send BillGates a Private Message Find more posts by BillGates Add BillGates to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 00:33.    Post New Thread    Post A Reply
Pages (6): « First ... « 2 3 4 5 [6]   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.122 seconds (49.97% PHP - 50.03% MySQL) con 22 query.