ISC-DHCP server on MacOS Sierra


(Mcivar) #1

Hey

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 ?

Br
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.