This script generates a random MAC address for the WAN interface on an OpenWRT/LEDE router. It is implemented as an init script, so it is able to randomize the MAC address every time the router restarts.
Nothing special. It should work on a base OpenWRT/LEDE system.
- Copy
wan-macto/etc/init.d/ - Make sure the file is executable (
chmod +x /etc/init.d/wan-mac) - Modify the
STARTline in the file if you'd like to customize the init order (optional) - Enable the service so it will randomize the MAC address on every boot (
/etc/init.d/wan-mac enable) - Restart your router or start the service manually (
/etc/init.d/wan-mac start)
Tested on:
- TP-Link TL-WR1043ND 1.0 running OpenWRT Chaos Calmer
- TP-Link Archer C2600 (AC2600) running LEDE snapshot
WTFPL