From 202a829101f2c06c73f49651895336e1d5df7391 Mon Sep 17 00:00:00 2001 From: "Er.Adam Eehan" Date: Wed, 11 Nov 2026 13:48:48 +0530 Subject: [PATCH] Create nftables configuration for gateway Added nftables configuration for input and forward chains along with NAT postrouting. --- gateway/nftables/gateway.nft | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 gateway/nftables/gateway.nft diff --git a/gateway/nftables/gateway.nft b/gateway/nftables/gateway.nft new file mode 100644 index 0000000..3647405 --- /dev/null +++ b/gateway/nftables/gateway.nft @@ -0,0 +1,22 @@ +#!/usr/sbin/nft -f +flush ruleset +table inet filter { + chain input { + type filter hook input priority 0; policy drop; + ct state established,related accept + iif lo accept + iifname "br-lan" accept + icmp type echo-request accept + } + chain forward { + type filter hook forward priority 0; policy drop; + ct state established,related accept + iifname "br-lan" oifname "wan" accept + } +} +table ip nat { + chain postrouting { + type nat hook postrouting priority 100; + oifname "wan" masquerade + } +}