Im essayant de configurer mon pi comme point d'accès avec les instructions d' Adafruit . Cependant, pour une raison quelconque, sudo apt-get install isc-dhcp-server
échoue toujours. J'ai regardé ce lien , mais il y a un sous-réseau défini dans mon dhcpd.conf (d'Adafruit):
/etc/dhcp/dhcpd.conf
.
.
.
# range 10.0.29.10 10.0.29.230;
# }
#}
subnet 192.168.42.0 netmask 255.255.255.0 {
range 192.168.42.10 192.168.42.50;
option broadcast-address 192.168.42.255;
option routers 192.168.42.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
Quand je le fais sudo apt-get install isc-dhcp-server
, je reçois:
Generating /etc/default/isc-dhcp-server...
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
failed!
et
pi@raspberrypi ~ $ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
pi@raspberrypi ~ $ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
pi@raspberrypi ~ $ sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED \
> -j ACCEPT
pi@raspberrypi ~ $ sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
pi@raspberrypi ~ $ sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
pi@raspberrypi ~ $ sudo service hostapd start
[ ok ] Starting advanced IEEE 802.11 management: hostapd.
pi@raspberrypi ~ $ sudo service isc-dhcp-server start
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
failed!
/ var / log / syslog:
Jul 26 03:05:25 raspberrypi dhcpd: Wrote 0 leases to leases file.
Jul 26 03:05:25 raspberrypi dhcpd:
Jul 26 03:05:25 raspberrypi dhcpd: No subnet declaration for wlan0 (192.168.42.\
1).
Jul 26 03:05:25 raspberrypi dhcpd: ** Ignoring requests on wlan0. If this is n\
ot what
Jul 26 03:05:25 raspberrypi dhcpd: you want, please write a subnet declarati\
on
Jul 26 03:05:25 raspberrypi dhcpd: in your dhcpd.conf file for the network s\
egment
Jul 26 03:05:25 raspberrypi dhcpd: to which interface wlan0 is attached. **
Jul 26 03:05:25 raspberrypi dhcpd:
Jul 26 03:05:25 raspberrypi dhcpd:
Jul 26 03:05:25 raspberrypi dhcpd: Not configured to listen on any interfaces!
Comment puis-je réparer ça?