diff options
author | Matthew Lemon <y@yulqen.org> | 2024-03-04 16:25:23 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-03-04 16:25:23 +0000 |
commit | 704d827a2ca8af1d4767c2cbf8ee9cf54d5e5812 (patch) | |
tree | 9f24f902e4f1f5f6178abd41b4c7c74169e5bf66 |
Initial commit
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | compose.yaml | 23 | ||||
-rw-r--r-- | config/named.conf | 15 | ||||
-rw-r--r-- | config/wark.yulqen.org.zone | 27 |
4 files changed, 66 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e934adf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +cache/ diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..c366fcb --- /dev/null +++ b/compose.yaml @@ -0,0 +1,23 @@ +version: "3" + +services: + bind9: + networks: + - macvlan-net + container_name: bind9-dns-server + image: ubuntu/bind9:latest + environment: + - BIND9_USER=root + - TX=Europe/London + ports: + - "192.168.1.10:53:53/udp" + - "192.168.1.10:53:53/tcp" + volumes: + - ./config:/etc/bind + - ./cache:/var/cache/bind + - ./records:/var/lib/bind + restart: unless-stopped +networks: + macvlan-net: + external: true + name: custommacvlan diff --git a/config/named.conf b/config/named.conf new file mode 100644 index 0000000..0d429ef --- /dev/null +++ b/config/named.conf @@ -0,0 +1,15 @@ +acl internal { + 192.168.1.0/24; +}; + +options { + forwarders { + 8.8.8.8; + 1.1.1.1; + }; + allow-query { internal; }; +}; +zone "wark.yulqen.org" IN { + type master; + file "/etc/bind/wark.yulqen.org.zone"; +}; diff --git a/config/wark.yulqen.org.zone b/config/wark.yulqen.org.zone new file mode 100644 index 0000000..0e3321e --- /dev/null +++ b/config/wark.yulqen.org.zone @@ -0,0 +1,27 @@ +$TTL 2d + +$ORIGIN wark.yulqen.org. + +; refer to https://bind9.readthedocs.io/en/latest/chapter3.html +; here is all the DNS record types we can have: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4 + +; this SOA record is required +@ IN SOA ns.wark.yulqen.orge info.wark.yulqen.org. ( + 2024030401 ; serial for this config + 12h ; refresh time + 15m ; retry + 3w ; expire + 2h ; minimum ttl + ) + +; this nameserver record is needed + + IN NS ns.wark.yulqen.org. +ns IN A 192.168.1.10 + +; -- add records below +taskd IN A 192.168.1.13 +jo IN A 192.168.1.17 +*.jo IN A 192.168.1.17 +adguard IN A 192.168.1.20 +; |