Changing MAC address presented to Network

It's not exactly what you want, but you could randomize the radio1 mac address, based on this script. Edit default_radio1 if it is not the correct wifi-iface.

cat << "EOF" > /root/wifimac
#!/bin/sh

uci set wireless.default_radio1.macaddr=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/') && wifi

exit 0
EOF
chmod 755 /root/wifimac

Insert /root/wifimac in /etc/rc.local above exit 0
You will have a different radio1 mac address after each restart. If you want to change the mac address without restarting the router, just type /root/wifimac

4 Likes