feat: setup rule to allow access from wan

This commit is contained in:
2025-04-28 10:06:05 +02:00
parent 74cd7c4859
commit 7021603e4e
2 changed files with 9 additions and 1 deletions

View File

@@ -57,6 +57,11 @@ let
in {
options.cloonar-assistant = {
setup = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable access from Wan to Setup";
};
networkPrefix = lib.mkOption {
type = lib.types.str;
example = "10.42";
@@ -165,6 +170,6 @@ in {
./networking
./updns
./home-assistant
./multiroom-audio
# ./multiroom-audio
];
}

View File

@@ -34,6 +34,9 @@ in {
chain input-allow {
udp dport != { 53, 5353 } ct state new limit rate over 1/second burst 10 packets drop comment "rate limit for new connections"
iifname lo accept
${lib.optionalString config.cloonar-assistant.setup ''
iifname "wan" accept
''}
${lib.optionalString config.cloonar-assistant.vpn.enable ''
iifname "wan" udp dport 51820 counter accept comment "Wireguard traffic"
''}