Pagina 1 di 1

Hostapd 0.6.9

Inviato: gio 23 lug 2009, 0:23
da ir0c
Salve a tutti,
ho una scheda wireless Atheros e sto tentando di configurarla come Access Point WPA-PSK seguendo la guida ufficiale dal sito madwifi ( http://madwifi-project.org/wiki/UserDoc ... _Both_Ends ).

Ho proceduto cosi:

Codice: Seleziona tutto

root -> 'etc' ~> lspci | grep Atheros
02:05.0 Ethernet controller: Atheros Communications Inc. AR2413 802.11bg NIC (rev 01)
root -> 'etc' ~>
Scaricato l'svn dei driver (sto testando su un kernel 2.6.29.4)

Codice: Seleziona tutto

cd madwifi-ng
make && make install
cd ..
wget http://hostap.epitest.fi/releases/hostapd-0.6.9.tar.gz
tar -xvzf hostapd-0.6.9.tar.gz
cd hostapd-0.6.9/hostapd
vim .config

Codice: Seleziona tutto

#=== .config ==

# Driver interface for madwifi driver
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/root/madwifi-ng # change to reflect local setup; directory for madwifi src
# IEEE 802.11F/IAPP
CONFIG_IAPP=y
# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y
# Integrated EAP server
CONFIG_EAP=y
# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y
# EAP-TLS for the integrated EAP server
CONFIG_EAP_TLS=y
# EAP-MSCHAPv2 for the integrated EAP server
CONFIG_EAP_MSCHAPV2=y
# EAP-PEAP for the integrated EAP server
CONFIG_EAP_PEAP=y
# EAP-GTC for the integrated EAP server
CONFIG_EAP_GTC=y
# EAP-TTLS for the integrated EAP server
CONFIG_EAP_TTLS=y

# EAP-PSK for the integrated EAP server
#CONFIG_EAP_PSK=y

# PKCS#12 (PFX) support (reads private keys or certificates from  .p12 or .pfx files)
CONFIG_PKCS12=y
# RADIUS authentication server. Access the integrated EAP server from external hosts using RADIUS.
CONFIG_RADIUS_SERVER=y

#=== EOF ===

make clean && make && make install
cp hostapd.deny /etc
cd /etc
vim hostapd.conf

#======= hostapd.conf =========

# An additional configuration parameter, bridge,
# must be used to notify hostapd if the interface is included in a bridge. 

#bridge=br0     # Enable this for standard bridging, leave disabled for netfilter firewalls

interface=ath0
driver=madwifi
logger_syslog=-1
logger_syslog_level=2
logger_stdout=--1
logger_stdout_level=2
debug=0
ctrl_interface_group=0
macaddr_acl=0
deny_mac_file=/etc/hostapd.deny
auth_algs=3
eapol_key_index_workaround=0
eap_server=0
dump_file=/tmp/hostapd.dump
ssid="My_WPA_Protected_AP_ESSID"
wpa=3  
wpa_psk=701459761a3d17c5ddead0deafbeeffeedbadf00dc659db31e2e3d36f00a12b1
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
#========= EOF =============

(come dal sito)

modprobe ath_pci

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap

lanciando "[i][u]hostapd -dd /etc/hostapd.conf[/u][/i]" Ottengo questo

root -> 'etc' ~> hostapd -dd /etc/hostapd.conf
Configuration file: /etc/hostapd.conf
Line 12: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
madwifi_set_iface_flags: dev_up=0
madwifi_set_privacy: enabled=0
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
Deauthenticate all stations
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=2
madwifi_set_privacy: enabled=0
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=0
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=1
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=2
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=3
Using interface ath0 with hwaddr XX:XX:XX:XX:XX:XX and ssid '"My_WPA_Protected_AP_ESSID"'
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0xa
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA=0x3
[b][color=#FF0000]ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
set80211param: Failed to set parameter (op 3 arg 5[/color])[/b]
IEEE 802.1X initialization failed.
ath0: Unable to setup interface.
madwifi_set_ieee8021x: enabled=0
madwifi_set_iface_flags: dev_up=0
root -> 'etc' ~>
Qualche suggerimento?
Grazie.

Re: Hostapd 0.6.9

Inviato: ven 24 lug 2009, 13:33
da clodo
Hai controllato con lspci che non sia stato caricato anche il driver ath5k che da un pò di tempo equipaggia il kernel e che ovviamente non gradisce essere in compagnia di ath_pci? Occorre scegliere uno o l'altro, entrambi funzionano con wpa, il madwifi è un pò più performente in termini "radiantistici".

Re: Hostapd 0.6.9

Inviato: ven 24 lug 2009, 16:48
da shark1500
Prima cosa per usare un'atheros: mettere in blacklist ath5k.

Seconda cosa: installare madwifi-ng, hostap non capisco cosa ti servano.

Vuoi tirare su un ap?

# wlanconfig ath create wlandev wifi0 wlanmode ap

E dopo lo prepari come vuoi con iwconfig.

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 8:34
da ir0c
Ovvio che se uso ath_pci ho tolto dal kernel ath5k.

Poi
wlanmode ath0 create wlandev wifi0 wlanmode ap
crea la modalità ap.

Ma a me serviva creare un AP WPA, non WEP.

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 9:46
da shark1500
ir0c ha scritto:Ma a me serviva creare un AP WPA, non WEP.
Quella non e` una "modalita`", ma se non sbaglio glielo devi dire dopo con iwconfig e wpa_supplicant

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 10:23
da ir0c
wpa_supplicant è lato client ...

Dal sito ufficiale "wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). It is suitable for both desktop/laptop computers and embedded systems. Supplicant is the IEEE 802.1X/WPA component that is used in the client stations"

Di conseguenza lo stesso sito tratta l'altro pacchetto (hostapd) per creare il lato "server" ..

Forse hai capito male.. non mi ci devo connettere volevo crearlo :P

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 12:28
da shark1500
ir0c ha scritto:Forse hai capito male.. non mi ci devo connettere volevo crearlo :P
No, ho sbagliato io, credevo che con iwconfig potessi direttamente creare un ap con wpa. Ad ogni modo qua ci sono gli esempi che ti servono. Dalla guida dovresti riuscirci senza problemi.

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 12:49
da ir0c
Anche con quel conf succede cosi ...

Codice: Seleziona tutto

root -> 'etc' ~> hostapd -dd hostapd.conf                                                                             
Configuration file: hostapd.conf                                                                                      
Line 38: DEPRECATED: 'debug' configuration variable is not used anymore                                               
ctrl_interface_group=0
madwifi_set_iface_flags: dev_up=0
madwifi_set_privacy: enabled=0
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
ath0: IEEE 802.11 Fetching hardware channel/rate support not supported.
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
Deauthenticate all stations
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=2
madwifi_set_privacy: enabled=0
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=0
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=1
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=2
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=3
Using interface ath0 with hwaddr XX:XX:XX:XX:XX:XX and ssid 'YOURSSID'
SSID - hexdump_ascii(len=8):
     59 4f 55 52 53 53 49 44                           YOURSSID
PSK (ASCII passphrase) - hexdump_ascii(len=20):
     79 6f 75 72 73 65 63 72 65 74 70 61 73 73 70 68   yoursecretpassph
     72 61 73 65                                       rase
PSK (from passphrase) - hexdump(len=32): 40 ef d3 0a 8f c3 c5 d6 08 66 b6 82 d3 5e dc bb 3a 7b 1b c1 90 5d 95 bd 29 2f 6a 2e cf d7 f7 b7
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0xa
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA=0x
ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
set80211param: Failed to set parameter (op 3 arg 5)
ath0: DRIVER Error enabling WPA/802.1X!
IEEE 802.1X initialization failed.
ath0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
madwifi_set_ieee8021x: enabled=0
madwifi_set_iface_flags: dev_up=0
root -> 'etc' ~>

Re: Hostapd 0.6.9

Inviato: sab 25 lug 2009, 13:35
da ir0c
Dai sto risolvendo forse era un errore esterno..