ISC-DHCP server on MacOS Sierra

(Mcivar) #1


I have been ruuning a ISC-DHCP server via brew for some time now. All of the sudden it started logging errors in the Console, first it complained about being unable to append to the dhcpd.leases file. Upon checking the directory, I see that root owns the file, but I own the directory. I then deleted the dhcpd.leases file, and restarted ISC-DHCPD from the Terminal directly to have the output directly, I then receive this error message.

unable to create icmp socket: Operation not permitted

Upon doing some searching, this seems to be related to not runnoing dhcpd as root.

But I cannot remeber ever having done something to make it run as root before. Has anything changed ?

It´s not normal to run ISC-DHCPD as a root user, as far as I know. Am i mistaken ?
Has anything changed? I think the only change I have done is updateing OS X Server app and SIerra itself to the latest release.
Any ideas ?

Tor-Ivar Kristoffersen

(Joshua McKinney) #2

Create a blank dhcpd.leases file (touch dhcpd.leases). According to the ISC-DHCP formula, this is required to start the server. It may be related to the error you’re receiving, but
the caveats in the formula also note dhcpd must be run as root. “Dhcpd needs to run as root since it listens on privileged ports.”. I.e. you can’t listen for DHCP requests (or ports < 1024) without being root on many operating systems.

(Alex Sharaz) #3

Seem to have similar issues, I’m running the latest version of isc-dhcp on macos 10.10, the daemon is running as root and the dhcpd.leases file is owned by root but if a device tries to obrain an ip addres from an assigned ip address pool I get the following

Sep 13 14:31:36 dhcpd[98064]: Internet Systems Consortium DHCP Server 4.4.1
Sep 13 14:31:36 dhcpd[98064]: Copyright 2004-2018 Internet Systems Consortium.
Sep 13 14:31:36 dhcpd[98064]: All rights reserved.
Sep 13 14:31:36 dhcpd[98064]: For info, please visit
Sep 13 14:31:36 dhcpd[98064]: Can’t open /usr/local/var/dhcpd/dhcpd.leases for append.

ip adress assignement works for known devices i.e as defined in dhcopd.conf but not for devices that aren;t defined in dhcpd.conf

(Sean Molenaar) #4

Does the /usr/local/var/dhcpd/dhcpd.leases file exist?