Service isc-dhcp-server fails to start

107,791

There was to things:

The most obvious one was to write address with two "d" here:

subnet 192.168.42.0 netmask 255.255.255.0{
        range 192.168.42.10 192.168.42.50;
        option broadcast-adress 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;
}

The second one was to start the wireless network by running:

sudo ifup wlan0

And I would have been able to start service isc-dhcp-server I made it thanks to this raspberrypihq tutorial to turn a RPi into a routeur.

Yet, I now have issues to run sudo update-rc.d isc-dhcpd-server enable. Any help would be warmly welcomed!

Share:
107,791

Related videos on Youtube

Revolucion for Monica
Author by

Revolucion for Monica

Updated on September 18, 2022

Comments

  • Revolucion for Monica
    Revolucion for Monica over 1 year

    I'm currently working on a project of making an highly secured router with my RaspberryPi to navigate anonymously on the net. Yet, I'm not able to correctly configurate the daemon to finalise the wifi the Internet connection to the new server:

    Indeed, when I do:

    :~ $ sudo service isc-dhcp-server start
    

    I get:

    Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.
    

    Here are my /etc/dhcp/dhcpd.conf settings

    authoritative;
    
    #added
    
    subnet 192.168.42.0 netmask 255.255.255.0{
            range 192.168.42.10 192.168.42.50;
            option broadcast-adress 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;
    }
    

    And here are my /etc/network/interfaces settings:

    source-directory /etc/network/interfaces.d
    
    auto lo
    iface lo inet loopback
    iface eth0 inet manual
    
    allow-hotplug wlan0
    iface wlan0 inet static
    adress 192.168.42.1
    netmask 255.255.255.0
    
    iface wlan0 inet dhcp
    
    iface eth0 inet manual
    
    allow-hotplug wlan0
    iface wlan0 inet static
    adress 192.168.42.1
    netmask 255.255.255.0
    
    iface wlan0 inet dhcp
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    
    allow-hotplug wlan1
    iface wlan1 inet manual
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    
    up iptables-restore < /etc/iptables.ipv4.nat
    

    My RaspberryPi is wirely connected but has a wifi dongle

    Here is the systemctl status isc-dhcp-server.service

    :~ $ systemctl status isc-dhcp-server.service
    ● isc-dhcp-server.service - LSB: DHCP server
       Loaded: loaded (/etc/init.d/isc-dhcp-server)
       Active: failed (Result: exit-code) since Tue 2016-06-07 00:13:45 CEST; 53s ago
      Process: 18098 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
    

    Some parts are written with a scary red...

    and here is the journalctl

    -- Logs begin at Mon 2016-06-06 21:17:01 CEST, end at Tue 2016-06-07 00:18:32 CEST. --
    Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: than a configuration issue please read the section on submitting
    Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: bugs on either our web page at www.isc.org or in the README file
    Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: before submitting a bug.  These pages explain the proper
    Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: process and the information we find helpful for debugging..
    Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: exiting.
    Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session opened for user root by (uid=0)
    Jun 07 00:17:01 raspberrypi CRON[18122]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
    Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session closed for user root
    Jun 07 00:18:32 raspberrypi sudo[18139]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
    Jun 07 00:18:32 raspberrypi sudo[18139]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
    
  • muru
    muru almost 8 years
    Try systemctl enable isc-dhcp-server.
  • Revolucion for Monica
    Revolucion for Monica almost 8 years
    @muru I did: :~ $ sudo systemctl enable isc-dhcpd-server Failed to execute operation: No such file or directory hummm...
  • Revolucion for Monica
    Revolucion for Monica almost 8 years
    @muru Great! It works! Thank you! I don't understand why the first one didn't worked...
  • muru
    muru almost 8 years
    update-rc.d? Since systemd is init, I don't really expect it to.
  • Revolucion for Monica
    Revolucion for Monica almost 8 years
    @muru ho? And what does init stands for? initialisation?
  • MikeH London
    MikeH London over 2 years
    Apologies for "strange formatting" that's purely something automated at AskUbunu. If you prefer more readable text, see the same advisory I posted at ServerFault: serverfault.com/questions/999484