From c35922ff5ec7b9f78798f32cbdbe2122be85b0d8 Mon Sep 17 00:00:00 2001 From: bmixed <2+bmixed@noreply.localhost> Date: Sat, 26 Sep 2026 01:37:16 +0000 Subject: [PATCH] Upload files to "/" --- pfw | 2 +- pfwd | 2 +- pfwe | 2 +- pfwrm | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pfw b/pfw index c771613..75bb8a7 100644 --- a/pfw +++ b/pfw @@ -27,4 +27,4 @@ sudo nft add rule ip nat prerouting tcp dport $iprt dnat to $oipa:$oprt sudo nft add rule ip nat postrouting ip daddr $oipa masquerade #sudo mkdir /etc/nftables/ #sudo ufw status -sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft +sudo nft list table ip nat #| sudo tee /etc/nftables/port-forwarding.nft diff --git a/pfwd b/pfwd index bc69c0e..e0e505e 100644 --- a/pfwd +++ b/pfwd @@ -7,5 +7,5 @@ sudo sysctl -w net.ipv4.ip_forward=0 sudo sed -i 's/DEFAULT_FORWARD_POLICY="ACCEPT"/DEFAULT_FORWARD_POLICY="DROP"/g' /etc/default/ufw sudo ufw reload sudo ufw status -sudo nft list ruleset; sudo rm -rf /etc/nftables/port-forwarding.nft +sudo nft list table ip nat; sudo rm -rf /etc/nftables/port-forwarding.nft diff --git a/pfwe b/pfwe index 24ece51..e3ff716 100644 --- a/pfwe +++ b/pfwe @@ -10,4 +10,4 @@ sudo nft add table ip nat sudo nft add chain ip nat prerouting { type nat hook prerouting priority -100 \; } sudo nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; } sudo ufw status -sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft +sudo nft list table ip nat #| sudo tee /etc/nftables/port-forwarding.nft diff --git a/pfwrm b/pfwrm index 0ef3ca4..0faae3b 100644 --- a/pfwrm +++ b/pfwrm @@ -6,7 +6,8 @@ iprt=$1 oprt=$2 oipa=$3 +sudo nft -f /etc/nftables.conf sudo nft delete rule ip nat prerouting tcp dport $iprt dnat to $oipa:$oprt sudo nft delete rule ip nat postrouting ip daddr $oipa masquerade #sudo ufw status -sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft +sudo nft list table ip nat #| sudo tee /etc/nftables/port-forwarding.nft