dnsmasq
dnsmasq(8) is a lightweight DNS and DHCP server.
Contents
Installation
Install the dnsmasq package through your preferred package manager.
For systemd-capable systems, start and enable dnsmasq.service.
Configuration
dnsmasq(8) is configured in /etc/dnsmasq.conf. You can test the configuration using dnsmasq --test.
Trusted Forwarding
dnsmasq(8) is not a recursive DNS server, so trusted (i.e. DNSSEC) forwarding must be setup. Either configure openresolv(8) as described in this example, or manually edit /etc/resolv.conf as:
127.0.0.1 localhost ::1 localhost trust-ad
Local-only DNS Cache
To use dnsmasq(8) strictly locally, ensure that it only listens on the loopback addresses.
listen-address=::1,127.0.0.1
Local Network DNS
To use dnsmasq(8) on the local network, ensure that it listens on a private address.
listen-address=::1,127.0.0.1,192.168.86.1