Skip to main content
  1. Our Guides/
  2. CoreDNS @ Wolfspyre Labs/
  3. ๐Ÿ”ง Configuring CoreDNS/

Corefile

Configuring CoreDNS #

So lets start with a REALLY simple corefile:

/etc/coredns/Corefile:

.:53 {
  cache
  unbound
  log
}
root@coredns-01:/usr/src# coredns -conf /etc/coredns/Corefile
[WARNING] An external plugin (/root/go/pkg/mod/github.com/coredns/unbound@v0.0.7/setup.go line 63) is using the deprecated function Normalize. This will be removed in a future versions of CoreDNS. The plugin should be updated to use OriginsFromArgsOrServerBlock or NormalizeExact instead.
.:53
CoreDNS-1.9.3
linux/arm64, go1.19, b55cee4d-dirty

Wahoo! it starts up!! Do we get a response tho?

Quick sanity check #

Query #
root@coredns-01:/usr/src/coredns# host google.com 127.0.0.1
google.com has address 142.250.113.102
google.com has address 142.250.113.138
google.com has address 142.250.113.139
google.com has address 142.250.113.100
google.com has address 142.250.113.101
google.com has address 142.250.113.113
google.com has IPv6 address 2607:f8b0:4023:1000::66
google.com has IPv6 address 2607:f8b0:4023:1000::8b
google.com has IPv6 address 2607:f8b0:4023:1000::64
google.com has IPv6 address 2607:f8b0:4023:1000::8a
google.com mail is handled by 10 smtp.google.com.
ServerSide #
root@coredns-01:/usr/src# coredns -conf /etc/coredns/Corefile
[WARNING] An external plugin (/root/go/pkg/mod/github.com/coredns/unbound@v0.0.7/setup.go line 63) is using the deprecated function Normalize. This will be removed in a future versions of CoreDNS. The plugin should be updated to use OriginsFromArgsOrServerBlock or NormalizeExact instead.
.:53
CoreDNS-1.9.3
linux/arm64, go1.19, b55cee4d-dirty
[INFO] 127.0.0.1:56449 - 5077 "A IN google.com. udp 28 false 512" NOERROR qr,rd,ra 184 0.129914016s
[INFO] 127.0.0.1:39124 - 20812 "AAAA IN google.com. udp 28 false 512" NOERROR qr,rd,ra 180 0.229490288s
[INFO] 127.0.0.1:58050 - 4602 "MX IN google.com. udp 28 false 512" NOERROR qr,rd,ra 396 0.146428124s
๐Ÿพ

Well Crap! We don’t want those ipv6 results #

The solution there is elucidated Here