dnsmasq
A lightweight DNS forwarder and DHCP server designed for small networks, home routers, embedded systems, and developer environments.
Lightweight DNS Forwarder
dnsmasq is a combined DNS forwarder and DHCP server designed to be simple and lightweight. It reads /etc/hosts for local names and forwards everything else to upstream resolvers. It is not a recursive resolver — it forwards queries rather than walking the DNS hierarchy itself.
dnsmasq ships as the default DNS component in OpenWrt (the Linux firmware for home routers), NetworkManager on Linux desktops, and many embedded Linux systems. It is also popular for local development environments — tools like minikube and macOS's Homebrew-based dev setups use dnsmasq for local domain routing.
- DNS forwarding with caching — not full recursion
- Reads
/etc/hostsautomatically — no zone file needed for simple local entries - DHCP server with static lease assignment by MAC address
- DHCP + DNS integration: assigns hostnames from DHCP leases automatically
- Wildcard local domains: e.g., route
*.dev.localto127.0.0.1 - TFTP server for PXE boot alongside DHCP
- No DNSSEC validation — not suitable for security-sensitive deployments
Key Configuration Examples
Basic dnsmasq.conf
Local domain routing (dev)
DHCP server config
macOS local dev setup
Related Topics
Full DNSSEC-validating recursive resolver for environments that need more than dnsmasq offers.
CoreDNSPlugin-based DNS server popular in Kubernetes and container environments.
Recursive ResolverHow recursive resolution works — dnsmasq forwards to an upstream resolver rather than resolving iteratively.