le services Hostapd (wifi)
configuration | ||||
---|---|---|---|---|
installation du service hostapd | sudo apt-get -y install hostapd | chemin des fichiers | /etc/hostapd /usr/share/doc/hostapd/ |
activation | sudo systemctl unmask hostapd sudo systemctl enable hostapd |
/etc/hostapd/hostapd.conf | ||||
---|---|---|---|---|
interface | interface wlan du Wi-Fi | interface=wlan0 | ||
driver | avec tous les drivers Linux mac80211 | driver=nl80211 | ||
ssid | le nom du ssid | ssid=Nexus | ||
hw_mode | le choix du mode Wi-Fi (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g) en fonction de la puce | hw_mode=g | ||
channel | canal de fréquence Wi-Fi (1-14) | channel=6 | ||
auth_algs | 0=Wi-Fi ouvert, pas d'authentification !1= authentification nécessaire | auth_algs=1 | ||
dtim_period | DTIM (delivery trafic information message) permet aux appareil de se mettre en veille pour économiser de l'energie | dtim_period=2 | ||
max_num_sta | Maximum number of stations allowed in station table | max_num_sta=255 | ||
rts_threshold | 2347 = disabled (default).RTS/CTS threshold; contrôle de flux matériel, permet de maintenir une connexion de données fiable entre l’émetteur et le receveu | rts_threshold=2347 | ||
fragm_threshold | Fragmentation threshold; 2346 = disabled (default) | fragm_threshold=2346 | ||
Avec Wi-Fi WPA (WPA-PSK-TKIP) | wpa=1 wpa_passphrase=passphrase wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP | |||
Avec Wi-Fi WPA2 (WPA2-PSK-CCMP) | wpa=2 wpa_passphrase=passphrase wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=CCMP | |||
macaddr_acl | permet d'activer ou non le filtrage mac, et/ou de mettre en place un serveur radius 0=acces uniquement sur liste noire 1=interdiction uniquelent sur liste blanche 2=utiliser u serveur radius | macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept #deny_mac_file=/etc/hostapd/hostapd.deny |
||
fichier hostapd.accept | b4:24:63:73:f8:14 00:07:a5:f9:a7:80 |
|||
beacon_int | Beacon interval in kus (1.024 ms) | beacon_int=100 | ||
/etc/default/hostapd | ||||
---|---|---|---|---|
pour rediriger les logs | DAEMON_OPTS="-dd -t -f /var/log/hostapd.log" | -dd : more login-t : include timestamp -f path |