set up unbound dns for server
This commit is contained in:
parent
78eb365eb9
commit
6864cb27cd
3 changed files with 15 additions and 4 deletions
17
modules/graphical/dns.nix
Normal file
17
modules/graphical/dns.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
networking.resolvconf.useLocalResolver = true;
|
||||||
|
services.dnsproxy = {
|
||||||
|
enable = true;
|
||||||
|
flags = [
|
||||||
|
"--cache"
|
||||||
|
"--cache-size=64000000"
|
||||||
|
"--cache-optimistic"
|
||||||
|
];
|
||||||
|
settings = rec {
|
||||||
|
upstream = [ "https://base.dns.mullvad.net/dns-query" ];
|
||||||
|
listen-addrs = [ "127.0.0.1" ];
|
||||||
|
fallback = [ "1.1.1.1" ];
|
||||||
|
bootstrap = fallback;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -59,6 +59,8 @@
|
||||||
url_preview_max_spider_size = 2097152;
|
url_preview_max_spider_size = 2097152;
|
||||||
max_request_size = 524288000;
|
max_request_size = 524288000;
|
||||||
db_cache_capacity_mb = 2056;
|
db_cache_capacity_mb = 2056;
|
||||||
|
|
||||||
|
query_over_tcp_only = true;
|
||||||
dns_cache_entries = 0;
|
dns_cache_entries = 0;
|
||||||
|
|
||||||
allow_public_room_directory_over_federation = true;
|
allow_public_room_directory_over_federation = true;
|
||||||
|
|
|
||||||
12
modules/server/dns.nix
Normal file
12
modules/server/dns.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
services.unbound = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
rrset-cache-size = "64M";
|
||||||
|
msg-cache-size = "64M";
|
||||||
|
discard-timeout = 4800;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue