Deployment
Scripts, utilities, and examples for deploying CoreDNS.
MacOS
The default settings will proxy all requests to hostnames not found in your host file to Google's DNS-over-HTTPS.
To install:
- Run
brew tap "coredns/deployment" "https://github.com/coredns/deployment"
- Run
brew install coredns
- Run
sudo brew services start coredns
- test with
dig google.com @127.0.0.1
and you should seeSERVER: 127.0.0.1#53(127.0.0.1)
To use CoreDNS as your default resolver (e.g. for your Wi-Fi
interface)...
via CLI:
- Run
networksetup -setdnsservers Wi-Fi 127.0.0.1
or via GUI:
- Open Network Preferences
- Select your interface i.e Wi-Fi
- Click
Advanced
- Select the
DNS
tab - Click the
+
below theDNS Servers
list box - Type
127.0.0.1
and hit enter - Click
OK
- Click
Apply
Debian
On a debian system:
- Run
dpkg-buildpackage -us -uc -b --target-arch ARCH
Where ARCH can be any of the released architectures, like "amd64" or "arm". - Most users will just run:
dpkg-buildpackage -us -uc -b
To install:
- Run
dpkg -i coredns_0.9.10-0~9.20_amd64.deb
.
This installs the coredns binary in /usr/bin, adds a coredns user (homedir set to /var/lib/coredns) and a small Corefile /etc/coredns.
To config:
vim $(brew --prefix)/etc/coredns/Corefile
somehost.com {
log
forward . someip:53
cache
errors
}
. {
hosts {
fallthrough
}
forward . https://8.8.8.8:53 https://8.8.4.4:53
cache
errors
}