What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Flashed Merlin Fork on Tmobile Cellspot -script to auto change wan MAC daily?

treo650

New Around Here
I have a Tmobile cellspot router, flashed to merlin fork firmware.

Question: how do I create a daily auto wan MAC address change?




Background
I always use Tomato firmware on my routers, and there was a script I set under scheduler for daily:

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
 
I have a Tmobile cellspot router, flashed to merlin fork firmware.

Question: how do I create a daily auto wan MAC address change?




Background
I always use Tomato firmware on my routers, and there was a script I set under scheduler for daily:

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

Have a look at this post:

http://forums.smallnetbuilder.com/showthread.php?p=63044#post63044
 
Something to try as starting point. Assuming you have already set up jffs and can enter scripts.....


Save the following as /jffs/scripts/macaddr.sh and mark as executable (assumes you are only using a single wan connection)

Code:
#!/bin/sh

MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
nvram set wan0_hwaddr="00:${MAC}"
service restart_wan
Set up a cron job using cru. Save as /jffs/scripts/services-start and mark as executable.

Code:
#!/bin/sh

# Start MAC addr change script midnight every day
cru a MacAddr "0 0 * * * /jffs/scripts/macaddr.sh"
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top