Last active
August 10, 2020 13:12
-
-
Save nij4t/54aab473add21aac1ee48c707d9c5480 to your computer and use it in GitHub Desktop.
Ingress Traffic Throttling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## downlink ############# | |
# slow downloads down to somewhat less than the real speed to prevent | |
# queuing at our ISP. Tune to see how high you can set it. | |
# ISPs tend to have *huge* queues to make sure big downloads are fast | |
# | |
# attach ingress policer: | |
/sbin/tc qdisc add dev $DEV handle ffff: ingress | |
# filter *everything* to it (0.0.0.0/0), drop everything that's | |
# coming in too fast: | |
/sbin/tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ | |
0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment