← Back to blog
bpdubuntu
How to Configure Dnsmasq for Your Local Network
17 November 2025bpd · ubuntu
A Look Inside the Dnsmasq Configuration File
The ‘Ubuntu System Administration Guide’ provides a clear, annotated example of a `dnsmasq.conf` file, making it easy to understand how to configure the service for your specific needs.
Key Configuration Options
- `interface`: Specifies which network interface `dnsmasq` should listen on (e.g., your private network card).
- `dhcp-range`: Defines the range of IP addresses to be handed out to clients (e.g., `10.33.33.10,10.33.33.200,12h`).
- `dhcp-option=3,…`: Sets the default gateway (your router’s IP).
- `dhcp-option=6,…`: Sets the DNS server address.
- `dhcp-host=…`: Allows you to assign a static, permanent IP address to a specific device based on its MAC address.
By editing this single file, you can take full control of your local network’s IP and DNS configuration.
This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13