dnsmasql is a simpel DNS server that requires a minimal configuration.

You run it with sudo dnsmasq -C dnsmasq.conf -d. You need to create or get a config file.

This is the simplest config file - it ignores the /etc/resolv.conf and /etc/hosts files and only defines the auth-zone and auth-server variables. It and it acts as the authoritative name server for the given domain.

# dnsmasq.conf
# Do not read /etc/resolv.conf or /etc/hosts
no-resolv
no-hosts

# Define the zone
auth-zone=azaeir.corp
auth-server=azaeir.corp

This basic config has no records so any requests to it will result in a failure.

We can add records simply like so:

# Do not read /etc/resolv.conf or /etc/hosts
no-resolv
no-hosts

# Define the zone
auth-zone=azaeir.corp
auth-server=azaeir.corp

# TXT record
txt-record=www.azaeir.corp,here's something useful!
txt-record=www.azaeir.corp,here's something else less useful.