Я пытаюсь настроить свой пи в качестве точки доступа с инструкциями от Adafruit . Однако по какой-то причине sudo apt-get install isc-dhcp-server
всегда происходит сбой. Я посмотрел на эту ссылку , но в моем dhcpd.conf определена подсеть (из 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;
}
Когда я делаю sudo apt-get install isc-dhcp-server
, я получаю:
Generating /etc/default/isc-dhcp-server...
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
failed!
а также
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!
/ Вар / Журнал / системный журнал:
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!
Как я могу это исправить?