From f5e2135a39309af20c02a25f3b2904c695cace00 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Tue, 27 Feb 2024 11:08:11 +0100
Subject: Update fw-nftables to allow multiple protocols in single rule
---
playbooks.d/fw-nftables/playbook.bash | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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")
--
cgit v1.1