Author Topic: IP changes to be done in firmware using FMK  (Read 6506 times)

Offline Ayansh1

  • New
  • *
  • Posts: 2
IP changes to be done in firmware using FMK
« on: September 19, 2013, 11:10:17 AM »
Hello Guys,
     I had upgraded my Cisco firmware to DD-WRT mini. Here the default IP is 192.168.1.1 which I need to change to 10.10.1.1. So I have to upgrade this DD-WRT firmware so that it by default gives IP 10.10.1.1. By looking into the extracted firmware, it seems that this all information is saved in /rootfs/etc/defaults.bin file.
So if I change IP address in this file and rebuild the firmware, then will the firmware by default value will change to 10.10.1.1 ? I had already bricked one of my router  :'( and do not want to brick another. Can you guys please let me know if I change any value inside /etc/defaults.bin file, then will it brick me router?

I will be really thankful to you guys.

Ayansh   



Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5280
  • Gender: Male
  • The Lasso
    • Bitsum
Re: IP changes to be done in firmware using FMK
« Reply #1 on: September 20, 2013, 09:28:22 AM »
Other changes may be necessary, or maybe that's sufficient.

You should work with a router you can unbrick first. Alternatively, you could try a virtual machine, at least testing the network configuration of your customized DD-WRT image before flashing it.

 
Software Engineer. Bitsum LLC.

Offline Ayansh1

  • New
  • *
  • Posts: 2
Re: IP changes to be done in firmware using FMK
« Reply #2 on: September 20, 2013, 10:36:46 AM »
Thanks for reply.
I want to perform some changes like Router name, Router IP Changes to 10.10.1.1, Enabling SSH by default, Enabling HTTPS by default etc. I was able to do perform Router name changes. Now was testing with IP changes. I was not knowing that we can test with virtual machine. I will first try to search how can we do that.

I am really Thankful to you.

Ayansh

Offline yof

  • New
  • *
  • Posts: 5
Re: IP changes to be done in firmware using FMK
« Reply #3 on: November 08, 2013, 04:07:24 AM »
the very basic thing you could do is add a script in /etc/init.d where the file name start with a "S".

This file should contain a condition that chack if router have been reseted then change the default router IP via Nvram command....
Like this :

Code: [Select]
if [ "$(nvram get http_username)" = "bJ/GddyoJuiU2" and  "$(nvram get http_passwd)" = "bJz7PcC1rCRJQ"   ]
then
  nvram set lan_ipaddr="10.0.1.1";
  nvram commit;
fi

as result, if login and password have not been set(this a key a i used to know if device have been reset), then the IP will change