This is a simple API for extracting client information from the ISC DHCP server. It is designed to be used on OPNSense, but should work any environment that uses the ISC DHCP server.
This tool is designed to be used with hostapd-api, and together they can be used to understand certain aspects of a network.
- Query DHCP static mappings
- Query DHCP leases
- Query mac address vendor name
- Rust 1.75 or higher
- isc-dhcpd
- Clone the repository
git clone https://github.com/dylanwh/dhcpd-api.git
- Build the project
cargo build --release
- Copy the service file from the
contrib/
directory to the/usr/local/etc/rc.d/
directory. You can do this with the following command:
sudo cp contrib/freebsd/dhcpd_api.sh /usr/local/etc/rc.d/dhcpd_api
sudo cp target/release/dhcpd_api /usr/local/bin/dhcpd_api
sudo service dhcpd_api start
# make sure it starts on boot
sudo sysrc dhcpd_api_enable=YES