CoreDNS

CoreDNS官网

https://coredns.io/

官方仓库地址

https://github.com/coredns/coredns

CoreDNS 配置文件

Corefile

.:53 {
	hosts {
		140.82.112.3 github.com
		185.199.108.153 *.github.io
		ttl 1800	
		fallthrough
	}

	forward . 223.5.5.5 tls://1.0.0.1 tls://1.1.1.1

	health :5353
	log
	errors
	cache
	reload 2s
	loadbalance

	template ANY AAAA {
		rcode NXDOMAIN
	}
    
	chaos SkDNS-001 hacker-shikong@qq.com
}


Linux 系统服务配置

[Unit]
Description=CoreDNS DNS server
Documentation=https://coredns.io
After=network.target
 
[Service]
ExecStart=/usr/local/bin/coredns -conf /etc/coredns/Corefile
ExecReload=/bin/kill -SIGUSR1 $MAINPID
Restart=on-failure
 
[Install]
WantedBy=multi-user.target