Dropping Wireless Clients on OpenWRT or How To Make Your Children’s Lives Miserable

Being out in a rural area, we don’t have the luxury of gigabit internet much less 60mbps so bandwidth is a precious commodity around these parts. Often I’m working from home downloading performance data or uploading mass amounts of data for analysis and I can’t afford to wait 2 days to get it done. After pulling my hair out, I managed to find some cli wizardry to kick off certain MAC addresses off my router. The code is below – simply update the MAC address section and run it as root on your OpenWRT router (I’m using a TP-LINK Archer C7 running Chaos Calmer and this works perfectly so your milage may vary.)

ubus call hostapd.wlan0 del_client '{"addr":"INSERT MAC HERE", "reason":1, "deauth":true, "ban_time":300000}'

ubus call hostapd.wlan1 del_client '{"addr":"INSERT MAC HERE", "reason":1, "deauth":true, "ban_time":300000}'

Depending on the radio the particular device is using you will need to hit both but again this depends on your router. Also, you can adjust the ban_time variable to suit your needs. I have 3 scripts saved to target the PS4, PS3 and the Wii U as they are often times the biggest bandwidth hogs so this works well for my needs. After a while the kids give up and stop trying to watch videos.

Finally, I configured shortcuts in Prompt to just allow me to selctively target a device with just a few taps on my phone or iPad.

I hope this brings you as much joy as it has me.