feat: add lo default rule
This commit is contained in:
parent
89a5af3465
commit
eb3da5ac36
3 changed files with 40 additions and 0 deletions
|
@ -114,6 +114,11 @@ let
|
|||
description = "Accept ICMP echo requests (\"pings\").";
|
||||
default = false;
|
||||
};
|
||||
|
||||
lo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "Accept traffic from `lo` (loopback). Applies if type = filter && hook = input.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -141,6 +146,8 @@ let
|
|||
];
|
||||
|
||||
icmpv6 = config.type == "filter" && config.hook == "input";
|
||||
|
||||
lo = config.type == "filter" && config.hook == "input";
|
||||
};
|
||||
|
||||
rules = lib.mkBefore (
|
||||
|
@ -154,6 +161,7 @@ let
|
|||
"icmp type echo-request accept"
|
||||
"icmpv6 type echo-request accept"
|
||||
]
|
||||
++ lib.optionals config.defaultRules.lo [ "iif lo accept" ]
|
||||
);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -519,6 +519,22 @@ Accept basic ICMPv6 request types\. Applies if type = filter \&\& hook = input\.
|
|||
|
||||
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Declared by:*
|
||||
- [module\.nix](https://git.defelo.de/Defelo/nfnix/src/branch/main/module\.nix)
|
||||
|
||||
|
||||
|
||||
## networking\.nftables\.tables\.\<name>\.chains\.\<name>\.defaultRules\.lo
|
||||
|
||||
|
||||
|
||||
Accept traffic from ` lo ` (loopback)\. Applies if type = filter \&\& hook = input\.
|
||||
|
||||
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
|
|
|
@ -142,6 +142,22 @@ Accept basic ICMPv6 request types\. Applies if type = filter \&\& hook = input\.
|
|||
|
||||
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Declared by:*
|
||||
- [module\.nix](https://git.defelo.de/Defelo/nfnix/src/branch/main/module\.nix)
|
||||
|
||||
|
||||
|
||||
## networking\.nftables\.tables\.\<name>\.chains\.\<name>\.defaultRules\.lo
|
||||
|
||||
|
||||
|
||||
Accept traffic from ` lo ` (loopback)\. Applies if type = filter \&\& hook = input\.
|
||||
|
||||
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue