For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Detect DHCP Servers With Systemd

Detect DHCP Servers With Systemd

Created by dave. Last edited by dave, one year and 39 days ago. Viewed 443 times. #3
[diff] [history] [edit] [rdf]


Need to detect DHCP servers on the local network.

Pretty Crude Solution



[Service] Type=forking ExecStart=/usr/bin/flock /var/lock/dhcp-monitor /usr/local/sbin/start-dhcp-monitoring




tcpdump -i ens192 -nev udp src port 67 | egrep 'Broadcast|bootps' | logger -t dhcp-monitor &

Alerting on rogue DHCP servers is left as an exercise for the reader.

Like I said, crude.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt