1

I try to set up a wifi access point with hostapd and isc-dhcpd but the dhcp server dont work.The conf file is the same i found in this tutorial: [Hostapd : The Linux Way to create Virtual Wifi Access Point][1] !!!!ok i think i wont get any help besides Not useful hints to Dokumentations i read already...!!!!

This is the Error message i get when i want to start it with the command "systemctl start isc-dhcp-server.service" or "service isc-dhcp-server start"

Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.

This is the output of the command "systemctl status isc-dhcp-server.service":

> root@l0calh0st:~# systemctl status isc-dhcp-server.service ●
> isc-dhcp-server.service - LSB: DHCP server    Loaded: loaded
> (/etc/init.d/isc-dhcp-server; generated; vendor preset: disabled)   
> Active: failed (Result: exit-code) since Tue 2018-01-09 18:23:07 CET;
> 3s ago
>      Docs: man:systemd-sysv-generator(8)   Process: 3831 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited,
> status=1/FAILURE)
> 
>     Jan 09 18:23:05 l0calh0st dhcpd[3842]: bugs on either our web page at www.isc.org or in the README file
>     Jan 09 18:23:05 l0calh0st dhcpd[3842]: before submitting a bug.  These pages explain the proper
>     Jan 09 18:23:05 l0calh0st dhcpd[3842]: process and the information we find helpful for debugging..
>     Jan 09 18:23:05 l0calh0st dhcpd[3842]: 
>     Jan 09 18:23:05 l0calh0st dhcpd[3842]: exiting.
>     Jan 09 18:23:07 l0calh0st isc-dhcp-server[3831]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
>     Jan 09 18:23:07 l0calh0st isc-dhcp-server[3831]:  failed!
>     Jan 09 18:23:07 l0calh0st systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
>     Jan 09 18:23:07 l0calh0st systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
>     Jan 09 18:23:07 l0calh0st systemd[1]: Failed to start LSB: DHCP server.

And This is the output of the command "journalctl -xe"

root@l0calh0st:~# journalctl -xe
Jan 09 19:44:42 l0calh0st dhcpd[4212]: 
Jan 09 19:44:42 l0calh0st dhcpd[4212]: 
Jan 09 19:44:42 l0calh0st dhcpd[4212]: Not configured to listen on any interfaces!
Jan 09 19:44:42 l0calh0st dhcpd[4212]: 
Jan 09 19:44:42 l0calh0st dhcpd[4212]: If you think you have received this message due to a bug rather
Jan 09 19:44:42 l0calh0st dhcpd[4212]: than a configuration issue please read the section on submitting
Jan 09 19:44:42 l0calh0st dhcpd[4212]: bugs on either our web page at www.isc.org or in the README file
Jan 09 19:44:42 l0calh0st dhcpd[4212]: before submitting a bug.  These pages explain the proper
Jan 09 19:44:42 l0calh0st dhcpd[4212]: process and the information we find helpful for debugging..
Jan 09 19:44:42 l0calh0st dhcpd[4212]: 
Jan 09 19:44:42 l0calh0st dhcpd[4212]: exiting.
Jan 09 19:44:44 l0calh0st isc-dhcp-server[4201]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Jan 09 19:44:44 l0calh0st isc-dhcp-server[4201]:  failed!
Jan 09 19:44:44 l0calh0st systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Jan 09 19:44:44 l0calh0st systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Jan 09 19:44:44 l0calh0st systemd[1]: Failed to start LSB: DHCP server.
-- Subject: Unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit isc-dhcp-server.service has failed.
-- 
-- The result is RESULT.

This is the etc/dhcp/dhcpd.conf file:

ddns-update-style none;
ignore client-updates;
authoritative;
option local-wpad code 252 = text;

subnet
10.0.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers
10.0.0.1;
# --- Netmask
option subnet-mask
255.255.255.0;
# --- Broadcast Address
option broadcast-address
10.0.0.255;
# --- Domain name servers, tells the clients which DNS servers to use.
option domain-name-servers
10.0.0.1, 8.8.8.8, 8.8.4.4;
option time-offset
0;
range 10.0.0.3 10.0.0.13;
default-lease-time 1209600;
max-lease-time 1814400;
}

This is the /etc/default/isc-dhcp-server file:

# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid

# Additional options to start dhcpd with.
#   Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#   Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="wlan0"
INTERFACESv6=""

This is the /etc/network/interfaces File: (I dont know if this is important)

    # 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


auto wlan0
iface wlan0 inet static
  address 10.0.0.14
  netmask 255.255.255.0

output for ifconfig:

root@l0calh0st:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.101  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 2003:50:ad02:a21:d455:ca81:501e:727a  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::da92:2698:1cc8:40d  prefixlen 64  scopeid 0x20<link>
        ether 40:8d:5c:52:43:f4  txqueuelen 1000  (Ethernet)
        RX packets 4908  bytes 2441138 (2.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5464  bytes 822466 (803.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdf200000-df220000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 188  bytes 14388 (14.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 188  bytes 14388 (14.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 36:58:48:6a:7b:16  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

!!!!ok i think i wont get any help besides Not useful hints to Dokumentations i read already...!!!!

1

You should first make the interface up and have The DHCP server Ip configured on it. go to /etc/network/interfaces (if you are running version 17 or before) or you can use netplan (for 18.04). remaining all configuration are correct.

0

dhcpd needs 2 files to work:
/etc/default/dhcpd.conf -- defines the interfaces(what you are missing)
and
/etc/dhcp/dhcpd.conf -- the file you have already finished up

the contents of /etc/default/dhcpd.conf should look something like this:

# /etc/default/dhcpd.conf
INTERFACES="eth0"
-1

You should use journalctl -xe (as the error message suggests) to get more detailed information on what the error actually is.

You may need to rummage around to find it. Or you could run journalctl -f in one terminal and restart the service which should write to the tail of the journal and be visible in the other terminal.


Jan 09 19:44:42 l0calh0st dhcpd[4212]: Not configured to listen on any interfaces!

^^^ There is your problem.

  • Did you read it, though? It seems fairly self evident. – Iain Jan 9 '18 at 18:49
  • And i noticed the "Not configured to listen on any interfaces!" But i dont know how and where i should add the interfaces? to the conf file? because i dont find anything in the tutorials... – ABeater Jan 9 '18 at 18:50
  • Read the documentation then! If I tread it for you only I am educated and you need the education more than I do. – Iain Jan 9 '18 at 18:51
  • I searched for a solution but besides to add the wlan0 interface to /etc/network/interfaces i found nothing..! And i already added wlan0 to /etc/default/isc-dhcp-server....! Maybe a idea? – ABeater Jan 9 '18 at 22:53
  • I already saved you the effort of reading the error message, I am not going to search google or read the documentation for you. – Iain Jan 10 '18 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.