Skip to content

Instantly share code, notes, and snippets.

@polaco1782
Created June 22, 2019 03:19
Show Gist options
  • Save polaco1782/1b4a56c39b0e9c49e067aac6dafe3464 to your computer and use it in GitHub Desktop.
Save polaco1782/1b4a56c39b0e9c49e067aac6dafe3464 to your computer and use it in GitHub Desktop.
Slow down instagram and facebook on you network. Applies to Brazilian NET/Claro networks
#!/bin/sh
tc qdisc del dev eth1 root
echo 0 > /proc/fast_nat
tc qdisc add dev eth1 root handle 1: prio
tc qdisc add dev eth1 parent 1:3 handle 30: tbf rate 20kbit buffer 1600 limit 3000
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip src 31.13.85.0/24 flowid 1:3
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip src 179.232.0.0/14 flowid 1:3
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip dst 31.13.85.0/24 flowid 1:3
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip dst 179.232.0.0/14 flowid 1:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment