The DNS server is optionnal.
Standart ports are 53
and 5353
.
import (
vmdns "github.com/bytearena/schnapps/dns"
)
[…]
zone := "sven.com."
records := map[string]string{
"foo.sven.com.": "1.2.3.4",
"bar.sven.com.": "4.3.2.1",
}
DNSServer := vmdns.MakeServer("127.0.0.1:53", zone, records)
err := DNSServer.Start()
// Error handling
check(err)
You might have forgot the .
(dot) at the end of your zone name.