Is a script for dnsmasq's --dhcp-script
option. Its purpose is to notify you via gotify if some unknown (that is, not in /etc/hosts
or dhcp-host
) host requests an ip in your network. Can be easily edited to deliver notifications over something else, e.g. apprise.
- gotify/cli
- choose and ripgrep
https://standards-oui.ieee.org/oui/oui.txt
or nmap (optional, for vendor identification)
The script is quite short, so i expect you to edit it appropriately if needed.
Points of interest:
This is a path to the copy of https://standards-oui.ieee.org/oui/oui.txt, defaults to /usr/local/share/oui.txt
curl -L 'https://standards-oui.ieee.org/oui/oui.txt' | sudo tee /usr/local/share/oui.txt
Defaults to /usr/share/nmap/nmap-mac-prefixes
If both present, oui.txt
is preferred since it should be more up to date.
Download and install the script
curl -L \
'https://raw.githubusercontent.com/MahouShoujoMivutilde/dnsmasq-lease-notifier/master/dnsmasq-lease-notifier.sh' |
sudo tee /usr/local/bin/dnsmasq-lease-notifier.sh
Add
dhcp-script=/usr/local/bin/dnsmasq-lease-notifier.sh
to /etc/dnsmasq.conf
In short:
- setup gotify/server somewhere
- in its webui create
dnsmasq watcher
app for your user, get its auth token - setup gotify/cli with said token on your dnsmasq server
- login in gotify on your phone