v0.1.0
This commit is contained in:
commit
fa432bebda
189 files changed
+26219
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# EasyDNS – default configuration, installed as /etc/easydns/config.yaml.
|
||||
#
|
||||
# Hybrid node: authoritative for your own zones + recursive resolver for the LAN.
|
||||
# check: easydns check-config
|
||||
# new zone: easydns zone create example.com --ns ns1.example.com --ip 192.0.2.1
|
||||
# reload: easydns reload (or: systemctl reload easydns)
|
||||
# status: easydns status (no API key needed – see api.local_token)
|
||||
|
||||
# Zone definitions (one file per zone) and TSIG keys (BIND `key "..." { ... };` files can
|
||||
# be copied here unchanged).
|
||||
include: ["zones.d/*.yaml", "keys.d/*.conf"]
|
||||
|
||||
server:
|
||||
mode: hybrid
|
||||
listen: ["0.0.0.0:53", "[::1]:53"]
|
||||
udp: true
|
||||
tcp: true
|
||||
data_dir: /etc/easydns/data # zone files in data/zones/, secondary copies, journals
|
||||
max_udp_payload: 1232
|
||||
|
||||
logging:
|
||||
level: info # error | warn | info | debug | trace
|
||||
format: text # text | json
|
||||
query_log: false # per-query logs are off by default (privacy)
|
||||
anonymize_clients: true
|
||||
|
||||
acls:
|
||||
lan: ["192.168.0.0/16", "10.0.0.0/8", "127.0.0.1/32"] # add 172.16.0.0/12 if you use it
|
||||
|
||||
recursion:
|
||||
enabled: true
|
||||
allowed_clients: ["acl:lan", "::1/128"] # never make this "any" (open resolver)
|
||||
qname_minimization: true
|
||||
dnssec_validation: true
|
||||
|
||||
resolution:
|
||||
default: recursive # recursive | forward | forwardthenrecursive | refuse
|
||||
# Encrypted forwarding instead of recursion (DNS-over-TLS to public resolvers):
|
||||
# resolution: { default: forward }
|
||||
# upstreams:
|
||||
# strategy: fastest
|
||||
# servers: ["tls://1.1.1.1:853#cloudflare-dns.com", "tls://9.9.9.9:853#dns.quad9.net"]
|
||||
|
||||
# DNS-over-TLS (853) and DNS-over-HTTPS (443, HTTP/2 and HTTP/1.1) for your clients:
|
||||
# tls:
|
||||
# cert_file: /etc/letsencrypt/live/dns.example.com/fullchain.pem
|
||||
# key_file: /etc/letsencrypt/live/dns.example.com/privkey.pem
|
||||
# dot_listen: ["0.0.0.0:853"]
|
||||
# doh_listen: ["0.0.0.0:443"]
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
max_entries: 100000
|
||||
|
||||
rate_limit:
|
||||
enabled: true
|
||||
per_client_qps: 200
|
||||
burst: 400
|
||||
exempt_clients: ["acl:lan"]
|
||||
|
||||
api:
|
||||
enabled: true
|
||||
listen: "127.0.0.1:9953" # loopback only, non-standard port
|
||||
local_token: true # CLI works out of the box (token in data_dir, mode 0640)
|
||||
# tokens: # extra tokens for remote tools / automation
|
||||
# - { name: admin, role: admin, token: "file:/etc/easydns/api.token" }
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
listen: "127.0.0.1:9090"
|
||||
@@ -0,0 +1,9 @@
|
||||
# Forwarder with DoT upstreams and conditional forwarding
|
||||
server: { mode: forwarder, listen: ["127.0.0.1:53"], data_dir: /etc/easydns/data }
|
||||
recursion: { allowed_clients: ["127.0.0.0/8", "::1/128", "192.168.0.0/16"] }
|
||||
upstreams:
|
||||
strategy: fastest
|
||||
servers: ["tls://1.1.1.1#cloudflare-dns.com", "tls://9.9.9.9#dns.quad9.net", "1.0.0.1:53"]
|
||||
forward_zones:
|
||||
- { domain: corp.internal, upstreams: ["192.168.1.1:53"] }
|
||||
resolution: { default: forward }
|
||||
@@ -0,0 +1,78 @@
|
||||
# EasyDNS example configuration (hybrid node). All addresses are documentation/test ranges.
|
||||
# Validate with: easydns check-config -c config/hybrid.yaml (or: econf check config/hybrid.yaml)
|
||||
# Zone definitions can live in separate files (like BIND `include`):
|
||||
include: ["zones.d/*.yaml"]
|
||||
|
||||
server:
|
||||
mode: hybrid
|
||||
listen: ["127.0.0.1:5353", "[::1]:5353"]
|
||||
udp: true
|
||||
tcp: true
|
||||
data_dir: ../data # secondary snapshots, IXFR journals, audit log
|
||||
max_udp_payload: 1232
|
||||
|
||||
logging:
|
||||
level: info # error | warn | info | debug | trace
|
||||
format: text # text | json
|
||||
query_log: false # per-query logs are off by default (privacy)
|
||||
anonymize_clients: true
|
||||
|
||||
# TSIG keys are optional. Zone transfers below are authorised by IP address only.
|
||||
# To also require a key, uncomment and add `transfer_tsig_key: xfr-key` to the zone:
|
||||
# keys:
|
||||
# - name: xfr-key
|
||||
# algorithm: hmac-sha256
|
||||
# secret: "env:DNS_TSIG_XFR" # generate: head -c 32 /dev/urandom | base64
|
||||
|
||||
acls:
|
||||
lan: ["192.168.0.0/16", "10.0.0.0/8"]
|
||||
|
||||
recursion:
|
||||
enabled: true
|
||||
root_hints: root.hints
|
||||
allowed_clients: ["127.0.0.0/8", "::1/128", "acl:lan"]
|
||||
qname_minimization: true
|
||||
dnssec_validation: false
|
||||
|
||||
zones:
|
||||
- name: example.com
|
||||
type: primary
|
||||
file: ../zones/example.com.zone # relative to data_dir
|
||||
transfer_acl: ["127.0.0.1/32"] # secondaries allowed to AXFR/IXFR (IP only)
|
||||
# transfer_tsig_key: xfr-key # optional: also require a TSIG key
|
||||
notify: [] # e.g. ["192.168.1.20:53"]
|
||||
- name: 2.0.192.in-addr.arpa
|
||||
type: primary
|
||||
file: ../zones/2.0.192.in-addr.arpa.zone # relative to data_dir
|
||||
|
||||
forward_zones:
|
||||
- domain: corp.internal
|
||||
upstreams: ["192.168.1.1:53", "192.168.1.2:53"]
|
||||
strategy: failover
|
||||
|
||||
upstreams:
|
||||
strategy: fastest
|
||||
servers: ["1.1.1.1:53", "9.9.9.9:53"]
|
||||
|
||||
resolution:
|
||||
default: recursive # recursive | forward | forwardthenrecursive | refuse
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
max_entries: 100000
|
||||
|
||||
rate_limit:
|
||||
enabled: true
|
||||
per_client_qps: 200
|
||||
burst: 400
|
||||
|
||||
api:
|
||||
enabled: true
|
||||
listen: "127.0.0.1:9953"
|
||||
auth_required: true
|
||||
tokens:
|
||||
- { name: admin, role: admin, token: "env:EASYDNS_ADMIN_TOKEN" }
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
listen: "127.0.0.1:9090"
|
||||
@@ -0,0 +1,17 @@
|
||||
# Minimal authoritative primary (master).
|
||||
# Transfers are authorised by secondary IP addresses; a TSIG key is optional (see below).
|
||||
server: { mode: primary, listen: ["0.0.0.0:53", "[::]:53"], data_dir: /etc/easydns/data }
|
||||
zones:
|
||||
- name: example.com
|
||||
type: primary
|
||||
file: zones/example.com.zone # = /etc/easydns/data/zones/example.com.zone
|
||||
transfer_acl: ["192.168.1.20/32"] # secondaries allowed to AXFR/IXFR
|
||||
notify: ["192.168.1.20:53"] # send NOTIFY after every change
|
||||
resolution: { default: refuse }
|
||||
|
||||
# Optional – also require a TSIG key for transfers:
|
||||
# keys:
|
||||
# - { name: xfr-key, algorithm: hmac-sha256, secret: "file:/etc/easydns/keys/xfr-key.secret" }
|
||||
# and in the zone:
|
||||
# transfer_tsig_key: xfr-key
|
||||
# notify_tsig_key: xfr-key
|
||||
@@ -0,0 +1,8 @@
|
||||
# Validating recursive resolver for a LAN (no upstream resolver required)
|
||||
server: { mode: recursive, listen: ["0.0.0.0:53", "[::]:53"], data_dir: /etc/easydns/data }
|
||||
recursion:
|
||||
enabled: true
|
||||
allowed_clients: ["127.0.0.0/8", "::1/128", "192.168.0.0/16"]
|
||||
qname_minimization: true
|
||||
resolution: { default: recursive }
|
||||
cache: { max_entries: 200000 }
|
||||
@@ -0,0 +1,41 @@
|
||||
; Root name server hints (IANA named.root). Update with: easydns root-hints update
|
||||
; or download https://www.internic.net/domain/named.root and verify its signature.
|
||||
. 3600000 NS A.ROOT-SERVERS.NET.
|
||||
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
|
||||
A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
|
||||
. 3600000 NS B.ROOT-SERVERS.NET.
|
||||
B.ROOT-SERVERS.NET. 3600000 A 170.247.170.2
|
||||
B.ROOT-SERVERS.NET. 3600000 AAAA 2801:1b8:10::b
|
||||
. 3600000 NS C.ROOT-SERVERS.NET.
|
||||
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
|
||||
C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
|
||||
. 3600000 NS D.ROOT-SERVERS.NET.
|
||||
D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
|
||||
D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
|
||||
. 3600000 NS E.ROOT-SERVERS.NET.
|
||||
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
|
||||
E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e
|
||||
. 3600000 NS F.ROOT-SERVERS.NET.
|
||||
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
|
||||
F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
|
||||
. 3600000 NS G.ROOT-SERVERS.NET.
|
||||
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
|
||||
G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d
|
||||
. 3600000 NS H.ROOT-SERVERS.NET.
|
||||
H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
|
||||
H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
|
||||
. 3600000 NS I.ROOT-SERVERS.NET.
|
||||
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
|
||||
I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
|
||||
. 3600000 NS J.ROOT-SERVERS.NET.
|
||||
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
|
||||
J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
|
||||
. 3600000 NS K.ROOT-SERVERS.NET.
|
||||
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
|
||||
K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
|
||||
. 3600000 NS L.ROOT-SERVERS.NET.
|
||||
L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
|
||||
L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42
|
||||
. 3600000 NS M.ROOT-SERVERS.NET.
|
||||
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
|
||||
M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
|
||||
@@ -0,0 +1,17 @@
|
||||
# Minimal authoritative secondary (slave).
|
||||
# The primary authorises this server by its IP address; a TSIG key is optional (see below).
|
||||
server: { mode: secondary, listen: ["0.0.0.0:53", "[::]:53"], data_dir: /etc/easydns/data }
|
||||
zones:
|
||||
- name: example.com
|
||||
type: secondary
|
||||
primaries: ["192.168.1.10:53"]
|
||||
allow_notify: ["192.168.1.10/32"] # default: the primaries' addresses
|
||||
transfer: { prefer: ixfr, fallback_axfr: true }
|
||||
# copy kept in /etc/easydns/data/zones/secondary/example.com.zone
|
||||
resolution: { default: refuse }
|
||||
|
||||
# Optional – sign transfer requests with a TSIG key (the primary must require the same key):
|
||||
# keys:
|
||||
# - { name: xfr-key, algorithm: hmac-sha256, secret: "file:/etc/easydns/keys/xfr-key.secret" }
|
||||
# and in the zone:
|
||||
# transfer: { prefer: ixfr, fallback_axfr: true, tsig_key: xfr-key }
|
||||
@@ -0,0 +1,6 @@
|
||||
# Plain list form: one or more zone definitions.
|
||||
- name: example.org
|
||||
type: secondary
|
||||
primaries: ["192.0.2.53:53"]
|
||||
allow_notify: ["192.0.2.53/32"]
|
||||
transfer: { prefer: ixfr, fallback_axfr: true } # IP-only variant (no TSIG)
|
||||
@@ -0,0 +1,11 @@
|
||||
# Mapping form: may also define keys, ACLs, forward zones and nested includes.
|
||||
acls:
|
||||
example-net-primaries: ["198.51.100.10/32", "2001:db8:100::10/128"]
|
||||
zones:
|
||||
- name: example.net
|
||||
type: secondary
|
||||
primaries: ["198.51.100.10:53", "[2001:db8:100::10]:53"]
|
||||
allow_notify: ["acl:example-net-primaries"]
|
||||
transfer: { prefer: ixfr, fallback_axfr: true }
|
||||
# optional TSIG: define `keys: [ { name: example-net-xfr, secret: "env:..." } ]`
|
||||
# above and add `tsig_key: example-net-xfr` to `transfer:`
|
||||
@@ -0,0 +1,4 @@
|
||||
Zone definitions included by `config/config.yaml` (`include: ["zones.d/*.yaml"]`).
|
||||
One file per zone or per customer; files are read in alphabetical order, hidden files
|
||||
and `*~` backups are ignored. Relative `file:` paths are resolved against the directory
|
||||
of the main configuration file.
|
||||
Reference in new issue
Block a user