Caution: We’re delving into a very specific realm here, but hey, even if it only resonates with three bearded men at the back of the room, I’ll take the blame.
This script allows you to limit the bandwidth of one or more network adapters. The true networking aficionados have always utilized the iproute-tc package (pronounced ‘ipéroute,’ not ‘i-prout,’ please), a tool for controlling network traffic. However, to cut to the chase without any hassle, an even better option is Wonder Shaper.
Wonder Shaper harnesses the power of Iproute’s TC but simplifies its operation entirely. To install it, clone this repository:
git clone https://github.com/magnific0/wondershaper.git
Navigate into the cloned directory and run the command as follows:
./wondershaper -a eth0 -u 4096 -d 8192
Replace ‘eth0’ with the name of your network interface (you can use ‘ifconfig’ to find out their names). Then, specify the upload amount with the ‘-u’ parameter (here set to 4 Mbps), and with the ‘-d’ parameter, the download quantity (set to 8 Mbps in this example).
And there you have it. It’s not more complicated than that.
Wonder Shaper can also be implemented persistently. If you want to learn more, head over to the GitHub page.