Split up router role into multiple roles
This commit is contained in:
parent
51ac8518a2
commit
508b86c9cc
6 changed files with 29 additions and 45 deletions
27
role/router-dns/default.nix
Normal file
27
role/router-dns/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ internalRouterIP, networkIdIP, revIpDomain, internalPrefixLength? 24, localDomain, }:
|
||||
|
||||
let pkgs = import <nixpkgs> { };
|
||||
in {
|
||||
services.unbound = {
|
||||
enable = true;
|
||||
interfaces = [ "127.0.0.1" internalRouterIP ];
|
||||
allowedAccess = [ "127.0.0.0/24" "${networkIdIP}/${toString internalPrefixLength}" ];
|
||||
extraConfig = ''
|
||||
# Custom configuration (leave this note to assure indentation!)
|
||||
do-not-query-localhost: no
|
||||
private-domain: "${localDomain}."
|
||||
domain-insecure: "${localDomain}."
|
||||
private-domain: "${revIpDomain}.in-addr.arpa."
|
||||
domain-insecure: "${revIpDomain}.in-addr.arpa."
|
||||
local-zone: "${revIpDomain}.in-addr.arpa" transparent
|
||||
|
||||
forward-zone:
|
||||
name: "${localDomain}."
|
||||
forward-addr: 127.0.0.1@5553
|
||||
|
||||
forward-zone:
|
||||
name: "${revIpDomain}.in-addr.arpa."
|
||||
forward-addr: 127.0.0.1@5553
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue