OpenWrt Forum Archive

Topic: Accidently used ifdown on the wrong interface

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

While configuring my router from a lan connection I made a small and unfortunate mistake.
I used ifdown in the lan interface... So the interface has been put down and I got disconnected.
Since I don't have any accessible wifi accesspoints to the router anymore either I'm now pretty much stuck in failsafe mode.
I've tried to locate the files that save the setting which interfaces should be enabled at boot but I couldn't find them.

So my question is, where's the file that stores the ifup/ifdown flag for the interfaces so I can once again access my router?

(Last edited by hello123456 on 4 May 2014, 22:52)

From the Openwrt ifdown source code:

keep track of the network interface states (stored in uci format in /var/state/network, overlay over /etc/config/network)

Boot in failsafe mode,
Type
'mount_root'

Now you'll be able to modify any file

Good luck!

(Last edited by dabyd64 on 5 May 2014, 00:28)

Uhm... ifdown simply shuts down the iface until the next boot or explicit ifup, so powercycling should've been enough...

I've tried that, but powercycling for some reason didn't help. I was unable to reconnect to my router even after multiple reboots... Eventually I decided to go for a factory reset and upload a settings back-up. Still required me to re-do part of the configuration which I was trying to avoid but did it anyway.

@dabyd, thanks for you answer, now I know where to look next time smile

Anyways, the router is back up now and I used it to make a timelapse of sunrise using a webcam and MJPG-streamer big_smile

The discussion might have continued from here.