About CoreDNS
CoreDNS is a DNS server written in Go and a graduated CNCF project, best known as the default cluster DNS in Kubernetes. Every feature is a plugin, and a short Corefile chains them: forwarding, caching, zone files, rewrites and metrics. Apache-2.0.
A DNS server wants a stable address and a dependable network. A CloudSat server gives CoreDNS a dedicated IPv4 and IPv6, DDoS filtering upstream and reverse DNS you set in the console.
After deploy CoreDNS listens on port 53. You decide what it does by editing the Corefile and restarting it.
What you get with CoreDNS
- Behavior defined in a few lines of Corefile
- Forwarding to upstream resolvers, DNS over TLS included
- Response caching
- Authoritative zones from files, with DNSSEC
- Prometheus metrics and health checks
- Query rewrites and access control lists
CoreDNS use cases
- A caching resolver for your servers and VPN clients
- Authoritative DNS for your own domains
- Split DNS for internal service names
After you deploy CoreDNS
- SSH in after the server shows Running and test it:
dig @127.0.0.1 example.comshould return an answer. - Edit the Corefile CoreDNS loads:
forwardto upstream resolvers,cachefor repeat queries,filefor zones you serve. - If it forwards queries, allow port 53 only from your own networks in the CloudSat firewall.
- Enable
prometheusfor metrics on port 9153 andhealthfor probes, keeping both private.
CoreDNS ports
Open these in your firewall if you use one: 53/udp DNS, 53/tcp DNS.
CoreDNS FAQ
Should my CoreDNS answer the whole internet?
Only for authoritative zones. An open forwarding resolver gets abused for amplification attacks, so limit recursive queries to your own IPs with a firewall rule or the acl plugin.
What does a minimal Corefile look like?
A server block for . with two lines, forward . 9.9.9.9 and cache, gives you a caching resolver. Add log while testing to see each query.
Disclaimer. The CoreDNS project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.