From 848bf9774d0b6a137d64e92e3a2a50b5ef1e6814 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 27 Sep 2024 23:34:08 -0600 Subject: [PATCH] ifix --- modules/module-rate-limit-web-port-forward.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/module-rate-limit-web-port-forward.sh b/modules/module-rate-limit-web-port-forward.sh index 59c1087..39e3598 100644 --- a/modules/module-rate-limit-web-port-forward.sh +++ b/modules/module-rate-limit-web-port-forward.sh @@ -8,8 +8,6 @@ done echo "Setting Rate Limit to : $1" echo -$NFT add rule ip nat prerouting tcp dport 443 dnat to 192.168.0.55 -$NFT add rule ip nat prerouting tcp dport 80 dnat to 192.168.0.55 $NFT add rule ip6 filter input ct state new tcp dport 443 update @http_ratelimit { ip6 saddr limit rate $1/second } accept $NFT add rule ip6 filter input ct state new tcp dport 80 update @http_ratelimit { ip6 saddr limit rate $1/second } accept @@ -17,3 +15,7 @@ $NFT add rule ip6 filter input ct state new tcp dport 80 update @http_ratelimit $NFT add rule ip filter input ct state new tcp dport 443 update @http_ratelimit { ip saddr limit rate $1/second } accept $NFT add rule ip filter input ct state new tcp dport 80 update @http_ratelimit { ip saddr limit rate $1/second } accept + +$NFT add rule ip forward prerouting tcp dport 80 dnat to 192.168.0.55 +$NFT add rule ip forward prerouting tcp dport 443 dnat to 192.168.0.55 +$NFT add rule ip forward postrouting ip daddr 192.168.0.55 masquerade