Skip to content
OpenWrt change MAC adres on any interface
Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
etc
LICENSE
README.md
mac-change.sh

README.md

OpenWrt random MAC changer

This script changes the MAC address on OpenWrt on any specified (v)NIC interface. Change th OUI of the MAC address in line 13 to a legitmate NIC vendor for RFC and IEEE compliancy. The 802.1X authentication server might have a validator in place to check spoofed MAC addresses against the above IEEE database.

Install MAC address changer script:

Initialize on startup:

$ chmod +x /etc/init.d/mac-change.sh
$ /etc/init.d/mac-change.sh enable

Verify:

$ /etc/init.d/mac-change.sh enabled && echo on
on

Edit /etc/rc.local to execute on startup in case the init is too slow:

$ vi /etc/rc.local
/etc/init.d/mac-change.sh start
exit 0

Use the logread command to for debugging and troubleshooting the script. More info on init scripts.

Leverage the crontab utilty if you want to change your MAC address every 3 hours:

$ /etc/init.d/cron start
$ /etc/init.d/cron enable
$ crontab -e
* 3 * * * /etc/init.d/mac-change.sh start

Verify:

$ crontab -l
* 3 * * * /etc/init.d/mac-change.sh start

License

Berkeley Software Distribution (BSD)

Author

Jeroen van Kessel | cryptsus.com - we craft cyber security solutions

You can’t perform that action at this time.