nixos/netbird: open up 0.59.0+ DNS forwarder port (#458138)
This commit is contained in:
@@ -231,6 +231,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openInternalFirewall = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Opens up internal firewall ports for the NetBird's network interface.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
hardened = mkOption {
|
hardened = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
@@ -502,8 +510,11 @@ in
|
|||||||
interfaces = listToAttrs (
|
interfaces = listToAttrs (
|
||||||
toClientList (client: {
|
toClientList (client: {
|
||||||
name = client.interface;
|
name = client.interface;
|
||||||
value.allowedUDPPorts = optionals client.openFirewall [
|
value.allowedUDPPorts = optionals client.openInternalFirewall [
|
||||||
5353 # required for the DNS forwarding/routing to work
|
# note: those should be opened up by NetBird itself, but it needs additional
|
||||||
|
# NixOS -specific debugging and tweaking before it works
|
||||||
|
5353 # <0.59.0 DNS forwarder port, kept for compatibility with those clients
|
||||||
|
22054 # >=0.59.0 DNS forwarder port
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user