Orbi WiFi 7 RBE973
Reply

Re: Editing .cfg file from D6200 Router

AnthM
Aspirant

Editing .cfg file from D6200 Router

I want to edit the .cfg file from my D6200 router, specifically the reservation table as I have a lot of devices I want add change and it would save a lot of time and effort if I didn’t have to do this through the web interface.

 

On older Netgear routers this use to be an easy case of downloading the backup config file to my PC editing the file in a text editor and restoring the edited file to the router job done.

 

When I try the same thing with the D6200 once I’ve edited the file in some way it will always fail to restore the config file to the router, I’ve also tried using Notepad++ to do the editing but still no joy.

 

So if anyone could give me some helpful solutions please that would be great. I use Window10 based PCs and have the latest version of Notepad++.

Message 1 of 6
antinode
Guru

Re: Editing .cfg file from D6200 Router

> When I try the same thing with the D6200 once I've edited the file in
> some way it will always fail to restore the config file to the router,
> I've also tried using Notepad++ to do the editing but still no joy.

   What did you use as an editor before you "also tried using
Notepad++"?

   Does this happen if you've "edited the file" but made no real change
to the text?

   I haven't tried it, so I know nothing, but my first guess would be
that your (unspecified) Windows editor(s) are changing the line endings
from the GNU/Linux-default LF to a more Windows-typical CR+LF, and that
that bothers the program on the router which reads the file.

   I assume that there is one, but I don't know of an easy way to check
line endings on Windows, other than looking for a change in file size
(+1 character/line) after passing through the editor.  If that turns out
to be what's happening, then you'd need to look for an editor option
which controls (inhibits) line-ending fiddling, or else use an editor
which doesn't take such liberties.  Vim, perhaps?

Message 2 of 6
AnthM
Aspirant

Re: Editing .cfg file from D6200 Router

Sorry should have said I just used Windows notepad previously which is a very dum text editor hence the reason I started use Notepad++ which supports more types of editing.

 

If I just open the config file in notepad++ and "save as" the file will reload to the router but as soon as I change one charactor in the file it will fail to reload on to the router.

 

I was hoping someone might have used notepad++ to do this and could advise the correct setting to make this work.

 

Saying that I'm open to trying other text editor, I'll take a look at VIM.

Message 3 of 6
antinode
Guru

Re: Editing .cfg file from D6200 Router

> If I just open the config file in notepad++ and "save as" the file will
> reload to the router but as soon as I change one charactor in the file
> it will fail to reload on to the router.

   So much for my first guess.  My second guess would be that there's
some kind of checksum in the data.  Looking more closely (and all the
way to the end) at some of my D7000 ".cfg" files, I notice two NULs and
four bytes of "noise" at the end of each file.  A little fooling around
(on a Mac) suggests that it could be a 32-bit CRC:

pro3$ find . -name '*.cfg' -exec cksum -o 3 {} \;
558161692 24875 ./NETGEAR_D7000_2017-07-03.cfg
558161692 24921 ./NETGEAR_D7000_2017-07-04_1.cfg
558161692 24921 ./NETGEAR_D7000_2017-07-04_2.cfg
558161692 24921 ./NETGEAR_D7000_2017-07-04_3.cfg
558161692 25193 ./NETGEAR_D7000_2017-08-02.cfg
558161692 25569 ./NETGEAR_D7000_2017-09-18.cfg

Those fields are: CRC-32, size (byte), file name.  ("Why 558161692?"

would be my next question, but I don't see anything special there.)

   So, apparently, you'd need to find/write a program to read the
(altered) data, and calculate and install a revised checksum to make the
file data acceptable.

Message 4 of 6
marc_luc
Initiate

Re: Editing .cfg file from D6200 Router

Hi, I have successfully used the following program to do as you suggested (called java Jacksum , see link in https://sarwiki.informatik.hu-berlin.de/Hacking_the_Netgear_wgt634u). However you need to "delete" the last 4 characters in the .CFG file before you run the CRC32 check on the file . You then need to add 4 new characters by converting the CRC result back into 4 characters. I found it easier to work in HEX pairs and I found "Notepad ++" program can edit the text and has a tool to convert hex pairs into characters to insert). You should be able to restore the cfg file to your modem without error from the CRC. Please be VERY VERY careful with changes to the text in the ,CFG file as any errors made in syntax error in the CFG file and you will "BRICK" your modem or at best revert back to factory defaults... (I didn't charge any text in my cfg, I just wanted to re-order the list of devices in "my access list" (Hey Netgear... this would be handy feature for the next release/update of the GUI!).
Model: D6200|Dual Band 11ac ADSL Modem Router
Message 5 of 6
weblee
Guide

Re: Editing .cfg file from D6200 Router

There is an ascii mode on this utility that will let you browse the file.  It is not stored in a manner that will allow copy past etc of stuff you may want to recreate like IP address/mac associations

 

http://www.nirsoft.net/utils/router_password_recovery.html

 

 

Message 6 of 6
Top Contributors
Discussion stats
  • 5 replies
  • 10799 views
  • 2 kudos
  • 4 in conversation
Announcements

Orbi WiFi 7