DNS Server Setup
To setup Local Lan based DNS Server usuing dnsmasq.
Install dnsmasq⚓︎
First install dnsmasq package. From Terminal enter:
Configuration⚓︎
Uncomment/update the below lines in /etc/dnsmasq.conf
Never forward plain names (without a dot or domain part)
Never forward addresses in the non-routed address spaces.
Add local-only domains here, queries in these domains are answered from /etc/hosts or DHCP only.
If you want dnsmasq to listen on by address (remember to include 127.0.0.1 if you use this.)
Set this if you want to have a domain automatically added to simple names in a hosts-file.
Set the domain for dnsmasq. this is optional, but if it is set, it does the following things.
- Allows DHCP hosts to have fully qualified domain names, as long as the domain part matches this setting.
- Sets the "domain" DHCP option thereby potentially setting the domain of all systems configured by DHCP
- Provides the domain part for "expand-hosts"
To set the cachesize.
Adding hosts/records⚓︎
Add hosts to /etc/hosts
file to be able to resolve by dnsmasq.
Example
Advanced Setup⚓︎
This will get you a basic dns setup for more advanced setup refer