-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'd like to define some Sets in the firewall table, but currently there doesn't seem to be a way to insert lines outside the chain blocks:
nixos-nftables-firewall/modules/chains.nix
Lines 171 to 176 in 2c5a199
| ruleset = '' | |
| table inet firewall { | |
| ${concatMapStrings (x: "\n${x}\n") requiredChains} | |
| } | |
| ''; | |
| }; |
This would let me use rules like:
example = {
from = [ "vlan1" ];
to = [ "local" ];
extraLines = [
''meta l4proto { tcp, udp } th dport @some_service_port ip daddr @some_service counter return comment "allow access some service"''
];
};with sets like:
set some_service_port {
type inet_service
elements = { 2001, 2002 }
}
set some_service {
type ipv4_addr
elements = { 10.0.0.10 }
}
Any interest in supporting this?
steveej
Metadata
Metadata
Assignees
Labels
No labels