Knowledge Base

Dnsmasq DHCP

Updated 26 May 2026

Install

bash
sudo apt install dnsmasq
sudo vim /etc/dnsmasq.conf
systemctl restart dnsmasq

Monitor

bash
sudo journalctl -u dnsmasq.service
cat /var/lib/misc/dnsmasq.leases

Configuration

bash
/etc/dnsmasq.conf
interface=eth1
dhcp-range=192.168.1.100,192.168.1.100,255.255.255.0,12h
dhcp-option=option:router,192.168.1.1
dhcp-option=option:dns-server,192.168.1.1
dhcp-authoritative