This commit is contained in:
Your Name 2024-09-27 23:34:08 -06:00
parent 8a0217d311
commit 848bf9774d

View File

@ -8,8 +8,6 @@ done
echo "Setting Rate Limit to : $1" echo "Setting Rate Limit to : $1"
echo 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 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 $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 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 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