diff --git a/pfw b/pfw index b314ed1..5dae46e 100644 --- a/pfw +++ b/pfw @@ -16,11 +16,11 @@ oipa=$3 sudo nft -f /etc/nftables.conf sudo sysctl -w net.ipv4.ip_forward=1 +sudo ufw reload 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 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 reload sudo nft list ruleset #| sudo tee /etc/nftables/port-forwarding.nft \ No newline at end of file