Hello,
I am using GL.Inet as a repeater and I need to change my Mac address periodically.
Trying to write a script to change Mac address but it doesn’t work. The only way works for me is go to Mac Clone http://192.168.8.1/#/macclone > Random > Apply
Is there a script that does this? Tried two so far
NEWMAC=$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/')
uci set wireless.sta.macaddr=${NEWMAC}
uci commit network
interface="eth0"
new_mac=$(dd if=/dev/random bs=1 count=3 2>/dev/null | hexdump -C | head -1 | cut -d' ' -f2- | awk '{ print "34:36:3b:"$1":"$2":"$3 }')
ifconfig $interface down
ifconfig $interface hw ether $new_mac
ifconfig $interface up