summaryrefslogtreecommitdiff
path: root/opt/nftables/nftables.conf
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/nftables/nftables.conf
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/nftables/nftables.conf')
-rw-r--r--opt/nftables/nftables.conf21
1 files changed, 21 insertions, 0 deletions
diff --git a/opt/nftables/nftables.conf b/opt/nftables/nftables.conf
new file mode 100644
index 0000000..c0b3b27
--- /dev/null
+++ b/opt/nftables/nftables.conf
@@ -0,0 +1,21 @@
+#!/usr/bin/nft -f
+
+## This is a basic workstation configuration based on
+## https://wiki.nftables.org/wiki-nftables/index.php/Simple_ruleset_for_a_workstation
+
+flush ruleset
+
+table ip filter {
+ chain input {
+ type filter hook input priority 0; policy drop;
+
+ # accept any localhost traffic
+ iif lo accept
+
+ # accept traffic originated from us
+ ct state established,related accept
+
+ # accept ssh logins via port 22
+ tcp dport 22 accept comment "Accept SSH on port 22"
+ }
+}