Netgear R6220 bricked after using custom OpenWrt firmware

Hello everyone, my Netgear R6220 got bricked after I customized the firmware using "Firmware Selector". I did a very stupid thing while I was doing that. Set the LAN address as "127.10.0.1". Now I can't set static IP to 127.10.X.X from my Windows PC as it showing reserved for loopback IP. I tried with Ubuntu but had no luck at all. Currently, my router is turned on also with a WIFI network, but I'm unable to connect to that even from my Android. But that WIFI network is correctly spreading as I configured in the custom firmware. But DHCP is not providing any IPv4 addresses.

In this situation, I don't know what to do! I want to revert to the stock OpenWrt firmware. How can I do that? I don't like the stock firmware of Netgear I want to continue with OpenWrt.

If I try to flash using Serial Port, will that work? As I saw on the tutorial, I may need to set my Static IP as "192.168.1.10". However, I changed the LAN address of my router to "127.10.0.1". So, I'm confused about whether will this work for me or not! Though I ordered the USB Serial cable online. Waiting for your expert suggestions.

Thanks in advance.

If you actually somehow did change the default IP embedded in the firmware image itself, you might be more in trouble. But I guess that you did the faulty config by hand, after the new firmware was installed, right? If you added a script to the firmware that modifies the default IP at boot, "reset" would not help. But failsafe should still work, as to my knowledge, you can't change the preinit default IP (for failsafe mode) with the firmware selector.

So, you should be able to at least boot it into failsafe mode.

Look for generic advice in https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset
and then also check the OpenWrt wiki page for your device for possible router-specific advice.

Ps.
I have no idea why anybody would try to set router's LAN IP to the no-op loopback / localhost range 127.x.x.x ... The whole 127.x.x.x is in practise non-usable, as each device thinks that 127.x.x.x means the device itself :frowning:

Like you probably now have noticed...

The allowed private IP ranges 192.168.0.0/16 , 172.16.0.0/12 , 10.0.0.0/8 (and fc00::/7 for IPv6) are well-defined. There is enough addresses there for your purposes.

2 Likes

TFTP flashing via serial happens in the bootloader before the actual firmware is booted. It is not influenced by a firmware or its configuration errors. That's the entire point, it should even work if the firmware is broken and wouldn't start at all.

Also, if you have access to the serial port, you could try connecting and opening a console into the running system and correct the network configuration by hand.

2 Likes

That would be the quite easy solution.
(Might even be more easy that managing to enter the failsafe mode.)

Hi.
An easy way to recover is to use nmrpflash. It works well with this device. You can even use it to directly flash a factory image. Browse the wiki.
https://openwrt.org/toh/netgear/r6220#debrickingback_to_stock_firmware

So, you should be able to at least boot it into failsafe mode.

Thanks a lot, @hnyman for the idea of FailSafe Mode. I've successfully flashed my router with the official OpenWrt firmware from FailSafe mode.

I have no idea why anybody would try to set router's LAN IP to the no-op loopback / localhost range 127.x.x.x ...

I don't even know why I did that! :expressionless: It's not like that, I'm new in networking or something like that. I still don't know how I did this stupidity! :neutral_face:

Thanks @takimata for the idea. I've done the flashing with failsafe mode already and didn't need the TFTP method to use. However, if failsafe mode won't work then definitely I would try your suggestion. Thanks again for your time.

I tried to flash with nmrpflash but it doesn't work for me as I was unable to set static IP to 127.X.X.X from my computer. So it doesn't detect my router. However, I've flashed the firmware from failsafe mode.

nrmpflash doesn't require to set IP on the router nor the computer. It works everytime, as long as the router runs the bootloader.
Anyway you have flashed and restore. Congrats.

Using openwrt, I installed BREED bootloader to replace nrmpflash.
Unfortuneatly, the 5GHz radio stopped working, so I parted with it.