Ceci est une ancienne révision du document !
sudo apt-get install hostapd zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz | sudo tee -a /etc/hostapd/hostapd.conf
Sauvegardez le fichier de configuration
cp /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.conf.save
Supprimez-le
rm /etc/hostapd/hostapd.conf
Créez-en un nouveau
nano /etc/hostapd/hostapd.conf
Placez cette configuration à l'intérieur
interface=wlx503eaa3d7d6c ssid=prxc driver=nl80211 channel=6 hw_mode=g wpa=2 wpa_passphrase=passphrase wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=CCMP
Pour logger, on peut ajouter les options suivantes :
logger_syslog=-1 logger_syslog_level=1 logger_stdout=-1 logger_stdout_level=2
Éditez le fichier /etc/network/interfaces et rajoutez les lignes suivantes
nano /etc/network/interfaces
auto wlx503eaa3d7d6c iface wlx503eaa3d7d6c inet static hostapd /etc/hostapd/hostapd.conf address 192.168.0.254 netmask 255.255.255.0
Ce qui nous donne au final :
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp # This is an autoconfigured IPv6 interface iface eth0 inet6 auto auto wlx503eaa3d7d6c iface wlx503eaa3d7d6c inet static hostapd /etc/hostapd/hostapd.conf address 192.168.0.254 netmask 255.255.255.0
Redémarrez le service
service hostapd stop service hostapd start
De même pour l'interface wifi
ifup wlx503eaa3d7d6c