feat: setup rule to allow access from wan
This commit is contained in:
@@ -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
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
''}
|
||||
|
||||
Reference in New Issue
Block a user