From 0f38a0ca6bc0b22e2e1f94a3a0e03ff26375633c Mon Sep 17 00:00:00 2001 From: chapeau Date: Sun, 27 Oct 2024 11:47:42 +0100 Subject: [PATCH] add dns forward zones --- group_vars/dns.yml | 4 ++++ roles/dns/templates/named.conf.local.j2 | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/group_vars/dns.yml b/group_vars/dns.yml index da9ca30..67cf8b0 100644 --- a/group_vars/dns.yml +++ b/group_vars/dns.yml @@ -15,3 +15,7 @@ zone_list: records: [] - name: wg.chapo.li records: [] + +forward_zones: + - name: internal.faercol.me + server: 192.168.1.12 \ No newline at end of file diff --git a/roles/dns/templates/named.conf.local.j2 b/roles/dns/templates/named.conf.local.j2 index 9e039fc..af17d7b 100644 --- a/roles/dns/templates/named.conf.local.j2 +++ b/roles/dns/templates/named.conf.local.j2 @@ -20,6 +20,14 @@ view "internal" { {% endif %} }; {% endfor %} + +{% for zone in forward_zones %} + zone "{{ zone.name }}" { + type forward; + forward only; + forwarders { {{ zone.server }}; }; + }; +{% endfor %} }; view "public" {