What's new

Bandwidth throttling for specific IP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

GreyFox

New Around Here
Hello everyone,

Can anyone tell me please, how can i limit the internet speed for specific IP in Merlin firmware?

I tried to paste the file services-start into jffs/scripts and run command chmod a+rx /jffs/scripts/services-start but nothing happend!!!

services-start file i created it with WRT54 Script Generator:

TCA="tc class add dev br0"
TFA="tc filter add dev br0"
TQA="tc qdisc add dev br0"
SFQ="sfq perturb 10"
tc qdisc del dev br0 root
tc qdisc add dev br0 root handle 1: htb
tc class add dev br0 parent 1: classid 1:1 htb rate 77777kbit
$TCA parent 1:1 classid 1:10 htb rate 2kbit ceil 222kbit prio 2
$TQA parent 1:10 handle 10: $SFQ
$TFA parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A POSTROUTING -d 192.168.1.111 -j MARK --set-mark 10
TCAU="tc class add dev imq0"
TFAU="tc filter add dev imq0"
TQAU="tc qdisc add dev imq0"
modprobe imq
modprobe ipt_IMQ
ip link set imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1: htb
tc class add dev imq0 parent 1: classid 1:1 htb rate 77777kbit
$TCAU parent 1:1 classid 1:10 htb rate 2kbit ceil 2kbit prio 2
$TQAU parent 1:10 handle 10: $SFQ
$TFAU parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A PREROUTING -s 192.168.1.111 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -j IMQ --todev 0


What im douing wrong?:confused:
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top