Outils pour utilisateurs

Outils du site


anthony_messe:banana_pi:ap_wifi_ipv4_classe_c

Ceci est une ancienne révision du document !


Mise en place du point d'accès pour IPv4 et une classe C

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
anthony_messe/banana_pi/ap_wifi_ipv4_classe_c.1525683050.txt.gz · Dernière modification: 2018/05/07 10:50 par Anthony Messé