Upload bandwith limit

i use iptables for limiting user download speed with that command

iptables -w 10 -A forwarding_rule -d 192.168.176.149 -m hashlimit --hashlimit-name "0X00158" --hashlimit-above 5000kb/s -j DROP

its work
but i want to limit to user upload speed i cant find which command anyone help me?

-s 192.168.176.149

Although you could do that easier with nft-qos

1 Like

i saw it but i couldnt install that i think version problem.
can i do that user upload speed limiting with iptable?

Yes, I answered it already, use -s.

thank you i tried iptables -w 10 -A forwarding_rule -s 192.168.176.149 -m hashlimit --hashlimit-name "0X00158" --hashlimit-above 1000kb/s -j DROP but still dont work. do you know another method?

 --hashlimit-mode srcip + -I zone_lan_forward

what's with the -w 10?

i tried these no working

iptables -w 10 -A forwarding_rule -s 192.168.176.149 -m hashlimit --hashlimit-name "0X00158" --hashlimit-upto 100kb/s --hashlimit-mode srcip -j DROP

iptables -w 10 -I zone_lan_forward -s 192.168.176.149 -m hashlimit --hashlimit-name "0X00158" --hashlimit-upto 100kb/s --hashlimit-mode srcip -j DROP

iptables -w 10 -A forwarding_rule -s 192.168.176.149 -m hashlimit --hashlimit-name "0X00159" --hashlimit-above 100kb/s --hashlimit-mode srcip -j DROP

iptables -w 10 -I zone_lan_forward -s 192.168.176.149 -m hashlimit --hashlimit-name "0X00159" --hashlimit-above 100kb/s --hashlimit-mode srcip -j DROP

i think wait 10 sec for adding rule mistakes

The other method I know is with nft-qos.
Post the whole iptables: iptables-save -c