OPNsense Forum

English Forums => General Discussion => Topic started by: Totalnoob on July 25, 2022, 01:36:04 PM

Title: Locked out! - deactivated all LAN ports, only WAN open
Post by: Totalnoob on July 25, 2022, 01:36:04 PM
Hi all, new to OPNSENSE.

I had a working fine setup with a DEC2750 when I accidentally turned off the LAN interface (the only one) trying to switch it to another physical port on the firewall. It logged me out as I was connected via that interface.

Now I only have WAN interface as assigned port and have no way of logging into OPNsense. I tried serial via the guide however, command can't find the directory to screen it. I'm not sure if it was even set up.

How can I log back in to assign a interface or even factory reset (doesn't seem to be a button on the firewall).

TIA
Title: Re: Locked out! - deactivated all LAN ports, only WAN open
Post by: Totalnoob on July 26, 2022, 02:57:11 PM
I was able to log in to serial with PUTTY but shows no options. If I type "sudo ifconfig igb0 up" it doesn't change, i still can't access web gui.

Any assistance to enable LAN interface or reset to factory greatly appreciated.
Title: Re: Locked out! - deactivated all LAN ports, only WAN open
Post by: Patrick M. Hausen on July 26, 2022, 03:00:33 PM
if the box has got an active network connection, i.e. you can ping systems via WAN, you can disable the firewall and should be able to access the UI via WAN:

pfctl -d

HTH, be careful,
Patrick
Title: Re: Locked out! - deactivated all LAN ports, only WAN open
Post by: yourfriendarmando on July 27, 2022, 06:03:07 AM
Can you access the opn shell via the root or an account with wheel/sudo rights?

/usr/local/sbin/opnsense-shell

From there you can reenable the interfaces, load a backup config, or factory reset.