summaryrefslogtreecommitdiff
path: root/nft/accept-filter.sh
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-20 21:01:58 +0500
committerMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-20 21:01:58 +0500
commit396b18a36a8ee72d347de9af5383f2a8a91c8e67 (patch)
tree8c29d6d2e758b08528143543ac12a027b0ba6ef7 /nft/accept-filter.sh
parent8a1b3be58997c81ac808fbe672f222791aae8ece (diff)
Add old scripts
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
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