feat: setup rule to allow access from wan
This commit is contained in:
@@ -57,6 +57,11 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
options.cloonar-assistant = {
|
options.cloonar-assistant = {
|
||||||
|
setup = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable access from Wan to Setup";
|
||||||
|
};
|
||||||
networkPrefix = lib.mkOption {
|
networkPrefix = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
example = "10.42";
|
example = "10.42";
|
||||||
@@ -165,6 +170,6 @@ in {
|
|||||||
./networking
|
./networking
|
||||||
./updns
|
./updns
|
||||||
./home-assistant
|
./home-assistant
|
||||||
./multiroom-audio
|
# ./multiroom-audio
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ in {
|
|||||||
chain input-allow {
|
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"
|
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
|
iifname lo accept
|
||||||
|
${lib.optionalString config.cloonar-assistant.setup ''
|
||||||
|
iifname "wan" accept
|
||||||
|
''}
|
||||||
${lib.optionalString config.cloonar-assistant.vpn.enable ''
|
${lib.optionalString config.cloonar-assistant.vpn.enable ''
|
||||||
iifname "wan" udp dport 51820 counter accept comment "Wireguard traffic"
|
iifname "wan" udp dport 51820 counter accept comment "Wireguard traffic"
|
||||||
''}
|
''}
|
||||||
|
|||||||
Reference in New Issue
Block a user