When I tried restoring the configuration, I got the error: "You cannot restore settings to a different router".
So I first needed to check what I had to change in the cfg file...
Source device:
gunzip -c tomato_v128_mDA3159.cfg | tr "\0" "\n" | grep "addr=00:1" et0macaddr=00:16:B6:DA:31:59 lan_hwaddr=00:16:B6:DA:31:59 wan_hwaddr=00:16:B6:DA:31:5A wl0_hwaddr=00:16:B6:DA:31:5B
Target device (to be overwritten):
gunzip -c tomato_v128_m4AF795.cfg | tr "\0" "\n" | grep "addr=00:1" et0macaddr=00:1D:7E:4A:F7:95 lan_hwaddr=00:1D:7E:4A:F7:95 wan_hwaddr=00:1D:7E:4A:F7:96 wl0_hwaddr=00:1D:7E:4A:F7:97
Ah! It might check the MAC address! Let's try changing that...
gunzip -c tomato_v128_mDA3159.cfg | perl -pi -e \ 's/addr=00:16:B6:DA:31:59/addr=00:1D:7E:4A:F7:95/g;'\ 's/addr=00:16:B6:DA:31:5A/addr=00:1D:7E:4A:F7:96/g;'\ 's/addr=00:16:B6:DA:31:5B/addr=00:1D:7E:4A:F7:97/g;'\ | gzip -9 > tomato_v128_copy.cfg(NB: OS X didn't have a sed command that worked nicely with binary files.)
It restored the modified configuration file!
After resetting the modem and other connections that have the old MAC address in memory, I could connect to the internet again.
Update
When upgrading to a different model router, the configuration files will not match. (it checks
boardtype, boardnum, boardflags and other settings).
In that case, you could also SSH to old router and export the configuration in an easier format:
nvram export --dump > 1.txt scp 1.txt darkfader@192.168.2.103:~
On the new router, you can them import the edited file.
2 comments:
How would you do this on a Windows7 PC?
i am a successful business owner and father. I got one of these already programmed blank ATM cards that allows me withdraw a maximum of $5,000 daily for 30 days. I am so happy about these cards because I received mine last week and have already used it to get $20,000. Skylink technology is giving out these cards to support people in any kind of financial problem. I must be sincere to you, when i first saw the advert, I believed it to be illegal and a hoax but when I contacted this team, they confirmed to me that although it is illegal, nobody gets caught while using these cards because they have been programmed to disable every communication once inserted into any Automated Teller Machine(ATM). If interested get through to them on mail: skylinktechnes@yahoo.com or whatsapp: +1(213)785-1553 or website: https://skylinktechnes.wixsite.com/info or telegram group: https://t.me/hacksandinvestmenttutorials
Post a Comment