Hi! I'd like to know if someone knows how to get Tomato 1.21 to change its MAC address on the WAN-side every 24 hours. Reason for this, I want a fresh IP every day. I hadn't found anything on the web-interface, so I guess this has to be done using scripts. I hoped to get some help here, since I'm not really in to that scripting stuff. Or maybe some other advice. Thanks
This is the script i use, run one a day via Administration > Scheduler Code: #http://www.dd-wrt.com/wiki/index.php/Useful_Scripts#Auto_Random_MAC_Address MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set wan_hwaddr="00:${MAC}" ifconfig vlan1 down ifconfig vlan1 hw ether 00:${MAC} ifconfig vlan1 up
Strange, it seems it stopped working with 1.23, the MAC won't change anymore. It only kills my Internet access. Anyone can confirm that?
so how come this doesn't work anymore? also, what happens exactly when it changes the mac address and gets a new ip while you are in middle of doing something, like torrenting? it would kill everything and have to reconnect right?
In all probability, yes, , the same as if you did it manually, it restarts some services, which causes a disconnect. Try Advanced. MAC Address Edit: Maybe initiating the change on disconnect, either manually or timeout would be a better solution?
Sometimes changing the mac address requires a reboot of the modem for the ip to come through to your router from the modem. I do this manually for this reason. I use 1 ip for bt and 1 ip for everything else
It worked before 1.23, and I reboot the modem the same time I change the MAC address on the router via curl on another computer. So the problem must be in 1.23.
MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set mac_wan="00:${MAC}" service wan restart
This thread helped me out a while back when I wanted to change my mac addresses at certain times. Here is what I use for my Asus RT-N66U, which has two wireless mac addresses. Keep in mind that my Motorola modem requires a reboot. Code: MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set lan_hwaddr="00:${MAC}" MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set wan_hwaddr="00:${MAC}" MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set wl0_hwaddr="00:${MAC}" MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'` nvram set wl1_hwaddr="00:${MAC}" nvram commit wget http://192.168.100.1/reset.htm?reset_modem=Restart+Cable+Modem sleep 30 reboot