2023-04-12 22:44:15 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
2023-04-01 22:20:34 +02:00
|
|
|
{
|
|
|
|
services.unbound = {
|
|
|
|
enable = true;
|
2023-04-12 22:44:15 +02:00
|
|
|
localControlSocketPath = "/run/unbound/unbound.socket";
|
2023-04-01 22:20:34 +02:00
|
|
|
settings.server = {
|
|
|
|
so-rcvbuf = "1m";
|
|
|
|
prefetch = true;
|
|
|
|
access-control = "10.0.0.0/8 allow";
|
|
|
|
interface = [ "127.0.0.1" ];
|
|
|
|
private-address = [
|
|
|
|
"192.168.0.0/16"
|
|
|
|
"169.254.0.0/16"
|
|
|
|
"172.16.0.0/16"
|
|
|
|
"10.0.0.0/8"
|
|
|
|
"fd00::/8"
|
|
|
|
"fe80::/10"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.prometheus.exporters.unbound = {
|
2023-04-12 22:44:15 +02:00
|
|
|
inherit (config.services.unbound) group;
|
2023-04-01 22:20:34 +02:00
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
port = 9090;
|
2023-04-12 22:44:15 +02:00
|
|
|
controlInterface = config.services.unbound.localControlSocketPath;
|
2023-04-01 22:20:34 +02:00
|
|
|
};
|
|
|
|
}
|