Lost access Newbie

Disable dhcp on accident. Connected to other router thru wan port and can ping it but cannot connect connection refused.

Attach a network cable to a lan port on the affected router.

Assign a manual address to the NIC of the client connecting in the same range as the router ie. 192.168.1.2 with a net mask 255.255.255.0

SSH in and modify the /etc/config/dhcp settings with vim to enable dhcp on the lan:

  • ssh root@192.168.1.1
  • vim /etc/config/dhcp
  • hit the i key to enter insert mode in vim
  • scroll down to "config dhcp 'lan'" and change the "option ignore '1'" to a 0.
  • hit the esc key to exit insert mode
  • type ":x" and hit enter to save changes and exit vim.
  • reboot and carry on as usual

If you can't ssh in because it wants a new key or something try the following command:

ssh -oHostKeyAlgorithms=+ssh-rsa root@192.168.1.1

Replace 192.168.1.1 with the actual ip address of the router if that's not it.

Or just factory reset the router if that is easier and faster and start over from scratch.

2 Likes

OP noted they disabled DHCP, connecting to LAN apparently doesn't work.

Add one step before:

  • temporarily assign an IP to the client connected to LAN (e.g. 192.168.1.2)
1 Like

Thanks lleachii I'm rusty :wrench:

1 Like

still cannot connect or ping. The only way I was able to ping was connecting wan port to ethernet port on another router... I think I may have set the LAN to DHCP... Therefore no IP assinged to lan..

You didn't told us what model your router is, but i guess there's a way to reset it to default values 1.
Another solution would be to dismantle the device and connect it via an USB-TTL-converter to your PC.
With this console you could view and change every setting.

1 Like

Got it thanks everyone

1 Like