Working dns setup for homelab setup with zones

This commit is contained in:
Ibrahim Mkusa 2024-10-07 22:00:39 -04:00
parent 59de418ebb
commit c5fea2eb24
2 changed files with 12 additions and 6 deletions

View File

@ -39,13 +39,17 @@
- name: allow access to a firewall - name: allow access to a firewall
ansible.posix.firewalld: ansible.posix.firewalld:
service: dns service: "{{item}}"
permanent: true permanent: true
state: enabled state: enabled
immediate: true immediate: true
loop:
- "dns"
- "dns-over-tls"
- "mdns"
- name: start the bind service - name: start the bind service
ansible.builtin.service: ansible.builtin.service:
name: named name: named
state: started state: restarted
enabled: true enabled: true

View File

@ -1,12 +1,14 @@
$TTL 8h $TTL 8h
@ IN SOA ns1.homelab.local. hostmaster.homelab.local. ( @ IN SOA ns1.homelab.local. hostmaster.homelab.local. (
2024100607 ; serial number 2022070601 ; serial number
1d ; refresh period 1d ; refresh period
3h ; retry period 3h ; retry period
3d ; expire time 3d ; expire time
3h ) ; minimum TTL 3h ) ; minimum TTL
;www IN A 192.168.2. IN NS ns1.homelab.local.
@ IN NS ns1.homelab.local. IN MX 10 mail.homelab.local.
www IN A 192.168.2.1
ns1 IN A 192.168.2.236 ns1 IN A 192.168.2.236
;mail IN A 192.0.2.20 mail IN A 192.168.2.1