MacOS: How to prevent DHCP server sending traffic to interfaces?
1
vote
0
answers
71
views
How can I prevent the Mac v13.7.3 DHCP server from sending traffic to network interfaces? I.e. how can I manage this?
I'm trying to invoke
dnsmasq
and another application is using port 67 socket. I also notice the VirtualBox clients are getting DHCP addresses on the "HostOnly" network.
I see this launchd is using the port:
sudo lsof -i :67
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 29u IPv4 0x60ac5cc81221ae9f 0t0 UDP *:67
launchd 1 root 39u IPv4 0x60ac5cc81221ae9f 0t0 UDP *:67
From this question and answer I put together that launchd may be invoking the DHCP server. I tried to edit /private/etc/bootpd.plist
in the section to disable the dhcp server:
dhcp_enabled
and reload as follows, however I get errors:
$ sudo /bin/launchctl unload system/bootpd.plist
Unload failed: 5: Input/output error
I try the following suggestion, however the port is still being used:
$ sudo launchctl unload -w /System/Library/LaunchDaemons/bootps.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/bootps.plist
$ sudo lsof -nP -i:67
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 39u IPv4 0x60ac5cc8052e1e9f 0t0 UDP *:67
launchd 1 root 41u IPv4 0x60ac5cc8052e1e9f 0t0 UDP *:67
$ sudo launchctl stop -w /System/Library/LaunchDaemons/bootps.plist
Exit status: 3
I didn't expect VBox clients to be receiving DHCP datagrams because nothing is checked in the GUI and the VBoxManage command line tool doesn't show any DHCP server active.
I'm running VirtualBox with HostOnly networks. I think this is what creates the bridge.
bridge0: flags=8863 mtu 1500
options=63
ether 82:00:0b:4b:e4:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en2 flags=3
ifmaxaddr 0 port 8 priority 0 path cost 0
member: en3 flags=3
ifmaxaddr 0 port 9 priority 0 path cost 0
nd6 options=201
media:
status: inactive
Asked by atod
(77 rep)
Jan 28, 2025, 12:39 PM
Last activity: Jan 29, 2025, 12:26 AM
Last activity: Jan 29, 2025, 12:26 AM