Script For changing WAN Mac address on DD-WRT?

Hey guys i was wondering if you know how to write a script that will change the wan mac address like every day or so. i am pretty sure that the dd-wrt firmware supports scripting, but im not sure... i know it has a command line input on the gui. Thanks for the help.

Not sure what your trying to accomplis by changing your mac address so aften.
enable ssh access for the router.
find the config file for the wan interface.
it should contain the mac address.
set up cron job to edit the file, genirating random mac.
also have the script up/down the wan interface to get new IP Address.

The hardest part of this will be the random mac.
the Secound thing is will what ever your routers connecting to take the changed mac with out a power cycle. I know my cable modem only stores one mac.

is it possible just to make the random mac address a boot script? so every time it reboots it will have a new mac?

i figured it out.

This is the startup script

!/bin/ash

MAC=(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'
echo "00:${MAC}"
ifconfig vlan1 down
ifconfig vlan1 hw ether 00:${MAC}
nvram set def_hwaddr="00:${MAC}"
nvram set wan_hwaddr="00:${MAC}"
nvram set vlan1_hwaddr="00:${MAC}"
ifconfig vlan1 up

im working on configuring the cron job to just reboot the router like every 3 days

I assume the OP is trying to lease a new WAN IP, if you're on dynamic with a bridged cable modem a change of MAC usually means a fresh IP, which some people like if the carrier uses a "sticky" system.

No, its not connected to a modem, its on a DHCP network