Skip to content

Instantly share code, notes, and snippets.

@uranio-235
Last active November 24, 2016 21:47
Show Gist options
  • Save uranio-235/8de5fbb0ed5f84012a4f3e39dccd509a to your computer and use it in GitHub Desktop.
Save uranio-235/8de5fbb0ed5f84012a4f3e39dccd509a to your computer and use it in GitHub Desktop.
carreta de picadillo para CONNECT
#!/bin/bash
tc qdisc add dev eth0 parent root handle 1: hfsc default 11
tc class add dev eth0 parent 1: classid 1:1 hfsc sc rate 128mbit ul rate 128mbit
tc class add dev eth0 parent 1:1 classid 1:11 hfsc sc rate 99999kbit ul rate 100000kbit
tc class add dev eth0 parent 1:1 classid 1:12 hfsc sc rate 80kbit ul rate 80kbit
tc qdisc add dev eth0 parent 1:11 handle 11:1 pfifo
tc qdisc add dev eth0 parent 1:12 handle 12:1 pfifo
iptables -t mangle -I INPUT -m string --algo bm --string 'CONNECT ' -j CLASSIFY --set-class 1:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment