[Résolu]Point d'accès Wifi !
Posté : sam. 14 juil. 2018 17:48
Salut à tous.
J'ai voulu suivre le didacticiel suivant :
--> https://www.raspberrypi.org/documentati ... s-point.md
qui consiste a créer un point d'accès wifi.
J'ai donc utilisé une nouvelle carte micro SD où j'ai installé la dernière version raspbian stretch, soit celle du 27 juin 2018.
J'utilise ma Rpi2B puisque ce test, je le fais sur une carte Micro SD.
Ma Rpi2B est branché à ma box par le câble éthernet et j'ai mis aussi ma clef wifi.
En résumé, j'ai configuré les points suivants :
1) test de ma clef wifi, afin de savoir si je peux l'utiliser en tant que "AP". La réponse est OUI.
2) configuration du fichier "/etc/dhcpcd.conf" :
3) installation de dnsmasq et configuration du fichier "/etc/dnsmasq.conf" :
4) installatiobn de hostapd et configuration du fichier "/etc/hostapd/hostapd.conf" :
5) décommenter la ligne suivante dans "/etc/sysctl.conf" :
6) exécution de :
7) puis ceci :
8) ajout de cela :
dans le fichier "/etc/rc.local", juste avant le "exit".
9) j'ai aussi ajouté un pont comme indiqué dans la dernière partie du didacticiel. Le pont fonctionne.
Voici le statut du service "dnsmasq" :
Comme on peut le constater, l'interface wlan0 n'existe pas. Le dongle wifi ne clignote pas.
Du coup, pas de point d'accès et je ne sais pas trop pourquoi.
Voici le test du service "hostapd" :
Pas d'erreur dans ce service.
Et enfin, le service "dhcpcd.conf" :
Un petit problème avec le DHCPv6, sans conséquence, je crois, avec le point d'accès et mon dongle wifi.
Le problème que je rencontre est que mon dongle wifi ne démarre pas et je ne sais pas pourquoi.
Par ailleurs, j'utilise ce dongle wifi avec une autre configuration de raspbian et je n'ai aucun problème pour me connecter.
Qu'est-ce que j'ai mal fait ?
@+
J'ai voulu suivre le didacticiel suivant :
--> https://www.raspberrypi.org/documentati ... s-point.md
qui consiste a créer un point d'accès wifi.
J'ai donc utilisé une nouvelle carte micro SD où j'ai installé la dernière version raspbian stretch, soit celle du 27 juin 2018.
J'utilise ma Rpi2B puisque ce test, je le fais sur une carte Micro SD.
Ma Rpi2B est branché à ma box par le câble éthernet et j'ai mis aussi ma clef wifi.
En résumé, j'ai configuré les points suivants :
1) test de ma clef wifi, afin de savoir si je peux l'utiliser en tant que "AP". La réponse est OUI.
2) configuration du fichier "/etc/dhcpcd.conf" :
Code : Tout sélectionner
denyinterfaces wlan0
denyinterfaces eth0
interface wlan0
nohook wpa_supplicant
static ip_address=192.168.4.1/24
Code : Tout sélectionner
interface=wlan0
dhcp-range=192.168.4.20,192.168.4.240,255.255.255.0,24h
Code : Tout sélectionner
interface=wlan0
bridge=br0
driver=nl80211
ssid=mywap
hw_mode=g
channel=7
ieee80211n=1
ieee80211ac=1
country_code=FR
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=blablabla
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
Code : Tout sélectionner
net.ipv4.ip_forward=1
Code : Tout sélectionner
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Code : Tout sélectionner
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
Code : Tout sélectionner
iptables-restore < /etc/iptables.ipv4.nat
9) j'ai aussi ajouté un pont comme indiqué dans la dernière partie du didacticiel. Le pont fonctionne.
Voici le statut du service "dnsmasq" :
Code : Tout sélectionner
root@raspberrypi:~# sudo service dnsmasq status
? dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-07-14 15:29:24 UTC; 4min 24s ago
Process: 1452 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
Process: 1523 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 1514 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 1511 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 1522 (dnsmasq)
CGroup: /system.slice/dnsmasq.service
+-1522 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-a
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: demarré, version 2.76 (taille de cache 150)
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: options à la compilation : IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: attention : l'interface wlan0 n'existe pas actuellement
juil. 14 15:29:24 raspberrypi dnsmasq-dhcp[1522]: DHCP, plage d'adresses IP 192.168.4.20 -- 192.168.4.240, durée de bail 1d
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: Lecture de /run/dnsmasq/resolv.conf
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: utilise le serveur de nom 192.168.1.1#53
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: utilise le serveur de nom 2a02:8435:342:3801::1#53
juil. 14 15:29:24 raspberrypi dnsmasq[1522]: lecture /etc/hosts - 6 adresses
juil. 14 15:29:24 raspberrypi dnsmasq[1523]: Too few arguments.
juil. 14 15:29:24 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
root@raspberrypi:~#
Du coup, pas de point d'accès et je ne sais pas trop pourquoi.
Voici le test du service "hostapd" :
Code : Tout sélectionner
root@raspberrypi:~# sudo service hostapd status
? hostapd.service - LSB: Advanced IEEE 802.11 management daemon
Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
Active: active (exited) since Sat 2018-07-14 15:01:28 UTC; 35min ago
Docs: man:systemd-sysv-generator(8)
Process: 580 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/hostapd.service
juil. 14 15:01:28 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
juil. 14 15:01:28 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.
root@raspberrypi:~#
Et enfin, le service "dhcpcd.conf" :
Code : Tout sélectionner
root@raspberrypi:~# sudo service dhcpcd status
? dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-07-14 15:17:50 UTC; 20min ago
Process: 1127 ExecStop=/sbin/dhcpcd -x (code=exited, status=0/SUCCESS)
Process: 1131 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 1133 (dhcpcd)
CGroup: /system.slice/dhcpcd.service
+-1133 /sbin/dhcpcd -q -b
juil. 14 15:18:37 raspberrypi dhcpcd[1133]: br0: confirming prior DHCPv6 lease
juil. 14 15:18:37 raspberrypi dhcpcd[1133]: br0: DHCPv6 REPLY: confirm failed
juil. 14 15:18:37 raspberrypi dhcpcd[1133]: br0: soliciting a DHCPv6 lease
juil. 14 15:18:38 raspberrypi dhcpcd[1133]: br0: REPLY6 received from fe80::46ce:7dff:fe96:45d0
juil. 14 15:18:38 raspberrypi dhcpcd[1133]: br0: adding address 2a02:8435:342:3801::440/128
juil. 14 15:18:38 raspberrypi dhcpcd[1133]: br0: renew in 43200, rebind in 75600, expire in 86400 seconds
juil. 14 15:18:38 raspberrypi dhcpcd[1133]: br0: probing address 192.168.1.44/24
juil. 14 15:18:43 raspberrypi dhcpcd[1133]: br0: leased 192.168.1.44 for 86400 seconds
juil. 14 15:18:43 raspberrypi dhcpcd[1133]: br0: adding route to 192.168.1.0/24
juil. 14 15:18:43 raspberrypi dhcpcd[1133]: br0: adding default route via 192.168.1.1
root@raspberrypi:~#
Le problème que je rencontre est que mon dongle wifi ne démarre pas et je ne sais pas pourquoi.
Par ailleurs, j'utilise ce dongle wifi avec une autre configuration de raspbian et je n'ai aucun problème pour me connecter.
Qu'est-ce que j'ai mal fait ?
@+