Requisits específics

Suplicant WP com per exemple wpa_supplicant. (En la web d'aquest producte disposem d'una llista de targetes wireless suportades i  drivers a fer servir).

1) Configuració

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="urv"
key_mgmt=WPA-EAP
proto=WPA
# Si la tarjeta soporta WPA2 con AES usaremos proto=RSN
pairwise=CCMP TKIP
group=CCMP TKIP
eap=TTLS
anonymous_identity="anonymous@urv.net"
identity="usuari@domini.urv.cat,"
password="mi-password"
phase2="auth=PAP"
}

És convenient protegir l'arxiu amb els permisos adequats de lectura ja que les credencials es troben en ell.

  • Introduirem l'usuari i password. El nom d'usuari té el següent format: usuari@domini.urv.cat, on usuari és el nom d'usuari que es fa servir per a la resta de serveis, i com a domini s'ha de fer servir pas,pdi o estudiant segons el perfil d'usuari. Per exemple, un estudiant hauria d'escriure: 39567987-X@estudiant.urv.cat, un professor: 39872123-D@pdi.urv.cat i un pas 39843123-R@pas.urv.cat

  • Ara hem de comprovar quin driver del wpa_supplicant sirveix per a cada chipset/targeta-WiFi/driver que estem fent servir, vegem quins drivers pot utilitzar el wpa_supplicant:

  • prompt$ wpa_supplicant -h
    wpa_supplicant v0.3.8
    Copyright (c) 2003-2005, Jouni Malinen and contributors

    This program is free software. You can distribute it and/or modify it under the terms of the GNU General Public License version 2.

    Alternatively, this software may be distributed under the terms of the BSD license. See README and COPYING for more details.

    This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)

    usage:
    wpa_supplicant [-BddehLqqvw] -i -c [-D] [-N -i -c [-D] ...]

    drivers:
    hostap = Host AP driver (Intersil Prism2/2.5/3)
    prism54 = Prism54.org driver (Intersil Prism GT/Duette/Indigo)
    madwifi = MADWIFI 802.11 support (Atheros, etc.)
    atmel = ATMEL AT76C5XXx (USB, PCMCIA)
    wext = Linux wireless extensions (generic)
    ndiswrapper = Linux ndiswrapper
    ipw = Intel ipw2100/2200 driver
    options:
    -B = run daemon in the background
    -d = increase debugging verbosity (-dd even more)
    -K = include keys (passwords, etc.) in debug output
    -t = include timestamp in debug messages
    -h = show this help text
    -L = show license (GPL and BSD)
    -q = decrease debugging verbosity (-qq even less)
    -v = show version
    -w = wait for interface to be added, if needed
    -N = start describing new interface


  • Si la nostra combinació chipset/targeta-WiFi/driver s'ajusta a alguna de les opcions, un script como el següent activarà la connexió WiFi 802.1x:
  • ifconfig mi-interfaz-wifi up
    wpa_supplicant -B -i mi-interfaz-wifi -c /etc/wpa_supplicant.conf -dd -D mi-driver
    sleep 5
    dhclient mi-interfaz-wifi


  • Per exemple en el cas d'un Intel Centrino amb targeta Intel Pro Wireless 2100, la línia que invoca al wpa_supplicant podrà susbtituir-se per:

    ifconfig eth1 up
    wpa_supplicant -B -i eth1 -c /etc/wpa_supplicant.conf -dd -D wext
    sleep 5
    dhclient eth1

     



    (les opcions -dd són per a depuració i si tot va bé no farà falta).

    En cas de tenir problemes amb wpa_supplicant es pot fer servir un  altre suplicant com Xsupplicant