♻️ [pi4] Refactor firewall with variables
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
{ common, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
@ -6,14 +8,9 @@
|
||||
80
|
||||
443
|
||||
];
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
extraInputRules =
|
||||
let
|
||||
localIPv4Range = "192.168.10.0/24";
|
||||
in
|
||||
''
|
||||
ip saddr ${localIPv4Range} accept
|
||||
'';
|
||||
extraInputRules = ''
|
||||
ip saddr ${common.localIpRange} accept
|
||||
'';
|
||||
};
|
||||
nftables.enable = true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user