From a8aef35c5cec5dc5b5272e407ca9d2f84bc4d76e Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 29 Jun 2023 09:44:55 +0800 Subject: [PATCH] hosts/plover: update Bind server config --- hosts/plover/modules/services/bind.nix | 30 ++++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hosts/plover/modules/services/bind.nix b/hosts/plover/modules/services/bind.nix index c632d817..fe4c3ddb 100644 --- a/hosts/plover/modules/services/bind.nix +++ b/hosts/plover/modules/services/bind.nix @@ -108,13 +108,17 @@ in include "${config.sops.secrets."plover/dns/${domain}/rfc2136-key".path}"; acl trusted { ${lib.concatStringsSep "; " internalsACL}; localhost; }; - view external { - match-clients { any; }; + view internal { + match-clients { trusted; }; - forwarders { }; - empty-zones-enable yes; allow-query { any; }; - allow-recursion { none; }; + allow-recursion { any; }; + forwarders { 127.0.0.53 port 53; }; + + zone "${fqdn}" { + type primary; + file "${zoneFile fqdn}"; + }; zone "${domain}" { type primary; @@ -127,18 +131,16 @@ in }; }; - view internal { - match-clients { trusted; }; - allow-recursion { any; }; - forwarders { 127.0.0.53 port 53; }; + view external { + match-clients { any; }; - zone "${fqdn}" { - type primary; - file "${zoneFile fqdn}"; - }; + forwarders { }; + empty-zones-enable yes; + allow-query { any; }; + allow-recursion { none; }; zone "${domain}" { - in-view external; + in-view internal; }; }; '';