feat: prevent dns leaks
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
6340657086
commit
87f425b1c6
2 changed files with 11 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ in
|
|||
type = types.str;
|
||||
default = "10.10.10.2/30";
|
||||
};
|
||||
|
||||
dns = mkOption {
|
||||
type = types.str;
|
||||
default = "9.9.9.9";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
@ -138,5 +143,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
environment.etc."netns/${cfg.namespace}/resolv.conf" = {
|
||||
text = ''
|
||||
nameserver ${cfg.dns}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue