Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
etc
/
sysconfig
/
Upload File :
New :
File
Dir
//proc/self/root/etc/sysconfig/tc_config
# Create the root discipline qdisc add dev eth0 root handle 1: htb default 20 # Tie a class on it. This allows us to further break down into # subclasses. class add dev eth0 parent 1: classid 1:1 htb rate 1000mbit # This will handle all of our legitimate traffic. We don't cap # as these are valid. We'll SFQ below as to allow for fair # use of the public device. class add dev eth0 parent 1:1 classid 1:10 htb rate 990mbit ceil 1000mbit # All other traffic is slamed down to a maximum of 10mbit. There's # nothing legitimate going on here. class add dev eth0 parent 1:1 classid 1:20 htb rate 10mbit # Ensure fair use of the legitimate traffic. qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 # Lastly, setup the filters. filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 80 0xffff flowid 1:10 filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 443 0xffff flowid 1:10 filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 22 0xffff flowid 1:10 filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 20 0xffff flowid 1:10 filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 21 0xffff flowid 1:10