A dead simple DNS server.
It reads records from /etc/hosts and answers type A queries.
No configuration needed.
Download the latest binary from the release page.
sudo ./hosts-dns
go get "github.com/miekg/dns"
git clone "https://github.com/mtucci/hosts-dns.git"
cd hosts-dns
go build hosts-dns
Before starting to listen on port 53, hosts-dns will print the list of records parsed from /etc/hosts. Suppose example.com is one of them, you can use dig to test it:
dig @127.0.0.1 example.com
Alternatively, using nslookup:
nslookup example.com 127.0.0.1