Skip to content

Installer un point d'accès Wi-Fi avec hostapd

Objectif

Mettre en place un point d'accès Wi-Fi local avec hostapd sur Debian 12.

Prérequis

  • Une interface Wi-Fi compatible (ex: wlan0)

  • Un serveur DHCP fonctionnel (hostapd ne gère pas le DHCP)

  • Connexion root (les commandes sont sans sudo)

1. Mettre à jour le système et installer hostapd

apt update
apt install hostapd -y
systemctl stop hostapd

2. Configurer hostapd

Éditer le fichier principal de configuration

nano /etc/hostapd/hostapd.conf

Exemple de configuration :

country_code=FR
interface=wlan0
ssid=wifi
channel=9
auth_algs=1
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

💡 Adapter interface, ssid et wpa_passphrase selon vos besoins.

Lier hostapd à son fichier de configuration

nano /etc/default/hostapd

Ajouter ou modifier la ligne suivante :

DAEMON_CONF="/etc/hostapd/hostapd.conf"

3. Activer et lancer hostapd

systemctl unmask hostapd
systemctl enable hostapd
systemctl start hostapd

Redémarrer si nécessaire :

systemctl restart hostapd

✅ Pour un test immédiat :

hostapd /etc/hostapd/hostapd.conf

Conclusion

Avec hostapd et un serveur DHCP actif, vous disposez d’un point d’accès Wi-Fi fonctionnel. Vérifiez la compatibilité de votre matériel Wi-Fi si le point d’accès ne démarre pas.