2020-12-26 15:45:54 +00:00
|
|
|
# Cool dns
|
|
|
|
|
|
|
|
A simple dns server written in Go. It supports zonefile parsing, different zones based on IP and forwarding.
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
Example config file
|
|
|
|
```yaml
|
|
|
|
zones:
|
|
|
|
- zone: example.com. # Fully qualified domain name of the zone
|
|
|
|
file: zonefile.txt # Path to the zonefile to parse
|
|
|
|
|
|
|
|
- zone: example.com.
|
|
|
|
file: zonefile2.txt
|
|
|
|
acl: # What IPs can query the zone
|
|
|
|
- lan
|
|
|
|
|
|
|
|
acl: # List of ip filter rules
|
|
|
|
- name: vpn # Name of the rule
|
|
|
|
cidr: 10.0.0.0/24 # CIDR of the rule
|
|
|
|
- name: lan
|
|
|
|
cidr: 192.168.0.0/16
|
|
|
|
- name: local
|
|
|
|
cidr: 127.0.0.1/32
|
|
|
|
|
2020-12-30 21:18:08 +00:00
|
|
|
tls:
|
|
|
|
enable: true # Enable DNS over TLS
|
|
|
|
address: 0.0.0.0:8853 # What address and port to liste for tls connections
|
|
|
|
cert: cert.crt # Path to the certificate file
|
|
|
|
key: private.key # Path to the private key file
|
|
|
|
|
2020-12-26 15:45:54 +00:00
|
|
|
forward:
|
|
|
|
acl: # What IPs are allowed
|
|
|
|
- vpn
|
|
|
|
server: "8.8.8.8:53" # DNS server to forward to
|
|
|
|
|
|
|
|
address: 0.0.0.0:8053 # What address and port to listen on
|
2020-12-30 21:18:08 +00:00
|
|
|
|
|
|
|
blacklist: # What domains to block when forwarding
|
|
|
|
# URL of the blacklist
|
|
|
|
- url: https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
|
|
|
|
format: host # Format of the blacklist: Hostfile
|
|
|
|
- url: https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt
|
|
|
|
format: line # Format: One domain per line
|
2021-02-01 23:51:23 +00:00
|
|
|
|
|
|
|
lego: # Support for Lego http provider. See https://go-acme.github.io/lego/dns/httpreq/
|
|
|
|
enable: true
|
|
|
|
address: :8080
|
|
|
|
username: lego
|
|
|
|
secret: "133742069ab"
|
2020-12-26 15:45:54 +00:00
|
|
|
```
|