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-mac
to/etc/init.d/
- Make sure the file is executable (
chmod +x /etc/init.d/wan-mac
) - Modify the
START
line 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:
- Linksys WRT1900ACS running OpenWrt 19.07
WTFPL