Skip to content

Commit 5dddb23

Browse files
rnhmjojMic92
authored andcommittedJun 4, 2017
dnschain: allow different bind and external addresses
(cherry picked from commit 2606d39)
1 parent 9e0a260 commit 5dddb23

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed
 

‎nixos/modules/services/networking/dnschain.nix

+13-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let
1717
host = ${cfg.dns.address}
1818
port = ${toString cfg.dns.port}
1919
oldDNSMethod = NO_OLD_DNS
20-
externalIP = ${cfg.dns.address}
20+
externalIP = ${cfg.dns.externalAddress}
2121
2222
[http]
2323
host = ${cfg.api.hostname}
@@ -47,8 +47,18 @@ in
4747
type = types.str;
4848
default = "127.0.0.1";
4949
description = ''
50-
The IP address that will be used to reach this machine.
51-
Leave this unchanged if you do not wish to directly expose the DNSChain resolver.
50+
The IP address the DNSChain resolver will bind to.
51+
Leave this unchanged if you do not wish to directly expose the resolver.
52+
'';
53+
};
54+
55+
dns.externalAddress = mkOption {
56+
type = types.str;
57+
default = cfg.dns.address;
58+
description = ''
59+
The IP address used by clients to reach the resolver and the value of
60+
the <literal>namecoin.dns</literal> record. Set this in case the bind address
61+
is not the actual IP address (e.g. the machine is behind a NAT).
5262
'';
5363
};
5464

0 commit comments

Comments
 (0)
Please sign in to comment.