summaryrefslogtreecommitdiff
path: root/nft/accept-filter.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nft/accept-filter.sh')
-rwxr-xr-xnft/accept-filter.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/nft/accept-filter.sh b/nft/accept-filter.sh
new file mode 100755
index 0000000..5dfe5dc
--- /dev/null
+++ b/nft/accept-filter.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (C) 2025-2026 Maria Lisina
+# SPDX-License-Identifier: Apache-2.0
+#
+# nftables accept filter
+
+set -e
+
+cat << EOF > /etc/nftables.nft
+#!/usr/sbin/nft -f
+
+flush ruleset
+
+table inet filter {
+ chain input {
+ type filter hook input priority 0; policy accept;
+ }
+
+ chain forward {
+ type filter hook forward priority 0; policy accept;
+ }
+
+ chain output {
+ type filter hook output priority 0; policy accept;
+ }
+}
+
+include "/var/lib/nftables/*.nft"
+include "/etc/nftables.d/*.nft"
+EOF