summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2024-02-27 11:08:11 +0100
committerPatrick Spek <p.spek@tyil.nl>2024-02-27 11:08:11 +0100
commitf5e2135a39309af20c02a25f3b2904c695cace00 (patch)
treecb7c016a2f42ff05735fd2d6b3b6f4d7844331c7
parentbb754e0eaf73654d5c14fbcf892e6360375fe27c (diff)
Update fw-nftables to allow multiple protocols in single rule
-rw-r--r--playbooks.d/fw-nftables/playbook.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/playbooks.d/fw-nftables/playbook.bash b/playbooks.d/fw-nftables/playbook.bash
index fcdb40a..1e52680 100644
--- a/playbooks.d/fw-nftables/playbook.bash
+++ b/playbooks.d/fw-nftables/playbook.bash
@@ -52,9 +52,10 @@ playbook_sync() {
while read -r rule
do
info "$BASHTARD_PLAYBOOK/sync" "Adding input filter for custom rule $rule"
- printf "\t\t%s" "$(config "$BASHTARD_PLAYBOOK.input.rules.$rule.proto")"
+ printf "\t\tmeta l4proto { %s } th" "$(config "$BASHTARD_PLAYBOOK.input.rules.$rule.proto")"
printf " dport %s" "$(config "$BASHTARD_PLAYBOOK.input.rules.$rule.port")"
printf " %s" "$(config "$BASHTARD_PLAYBOOK.input.rules.$rule.policy" "accept")"
+ printf " comment \"%s\"" "$rule"
printf ";\n"
done < <(config_subkeys "$BASHTARD_PLAYBOOK.input.rules")