OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: clnutter1984 on December 01, 2022, 04:33:07 pm

Title: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 04:33:07 pm
Hello,

I am new to OPNsense so I am trying to follow the basic setup instructions. 

Install of OPN sense went good. No errors.  I am able to setup the WAN port and connect to the Web GUI. 

Then I go to the Wizard to do the setup BUT as I add the LAN port the OPNsense Wed GUI becomes unreachable.  I am unable to Ping the WAN ip or the LAN ip.  Both Links are showing as up. Both IPs are unreachable. 

WAN is showing x.x.x.204 DHCP
LAN is showing 192.168.1.1 

I can log in as root via console.  The only way I can regain Web GUI is restoring to factory default.


I know I am missing something but what can someone please help me out?   I can provide more info if needed.

Current version is:
OPNsense 22.7.9-amd64
FreeBSD 13.1-RELEASE-p5
OpenSSL 1.1.1s 1 Nov 2022
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: chemlud on December 01, 2022, 04:36:12 pm
...more likely than not you simply choose the wrong interface for WAN/LAN. Try via console with "auto detection" and plug in an RJ45 (connected to a computer on the other end...) to the respective port when asked for...
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 04:47:40 pm
Nothing.  Both Links show as up.  But I can not access the Web GUI.

I have to reset to factory default to be able to connect to it.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 05:06:58 pm
...more likely than not you simply choose the wrong interface for WAN/LAN. Try via console with "auto detection" and plug in an RJ45 (connected to a computer on the other end...) to the respective port when asked for...

chemlud: yeah, I rechecked again and its correct.

igc0 is set to WAN
igc1 When I set it to LAN it seems to lock out the Web GUI
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: Demusman on December 01, 2022, 05:25:45 pm
...more likely than not you simply choose the wrong interface for WAN/LAN. Try via console with "auto detection" and plug in an RJ45 (connected to a computer on the other end...) to the respective port when asked for...

chemlud: yeah, I rechecked again and its correct.

igc0 is set to WAN
igc1 When I set it to LAN it seems to lock out the Web GUI

By default that would be backwards. Opnsense uses the first interface as LAN, so you really are probably reversing them as said.
Config it the way you want it, then reverse the cables.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 08:52:26 pm
...more likely than not you simply choose the wrong interface for WAN/LAN. Try via console with "auto detection" and plug in an RJ45 (connected to a computer on the other end...) to the respective port when asked for...

chemlud: yeah, I rechecked again and its correct.

igc0 is set to WAN
igc1 When I set it to LAN it seems to lock out the Web GUI

By default that would be backwards. Opnsense uses the first interface as LAN, so you really are probably reversing them as said.
Config it the way you want it, then reverse the cables.

Again, no. I reset redid it both ways twice now.  Also tried the cable idea.  It has not worked.

Neither IP is reachable.  LAN OR WAN Can not ping them or connect to them.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 09:06:49 pm
This is how it is setup:

Interfaces: [OPT1] (This would be LAN BUT its not enabled or labled.)

Enable    Enable Interface (NOT ENABLED because as soon as it is everything becomes unreachable)
Lock    Prevent interface removal (NOT Locked)
igc0
The real device name of this interface.
Description    
OPT1  (as soon as it is named LAN or the interface is added everything becomes unreachable)
Enter a description (name) for the interface here.

Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: Patrick M. Hausen on December 01, 2022, 09:30:53 pm
Why are you trying to switch the interfaces? On a brand new default configuration OPNsense

Why don't you just use the box that way? Plug into the first port and you get connectivity to your OPNsense UI. Plug the second port into your uplink and configure that one according to the needs of your connection/ISP. Done.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 09:44:36 pm
Why are you trying to switch the interfaces? On a brand new default configuration OPNsense
  • the first interface is LAN
  • the second interface is WAN

Why don't you just use the box that way? Plug into the first port and you get connectivity to your OPNsense UI. Plug the second port into your uplink and configure that one according to the needs of your connection/ISP. Done.

I will try it in that order and see what happens.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 01, 2022, 09:50:14 pm
Why are you trying to switch the interfaces? On a brand new default configuration OPNsense
  • the first interface is LAN
  • the second interface is WAN

Why don't you just use the box that way? Plug into the first port and you get connectivity to your OPNsense UI. Plug the second port into your uplink and configure that one according to the needs of your connection/ISP. Done.

Unable to connect

An error occurred during a connection to 192.168.1.1.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.

IT first asks to configure WAN.  Then LAN.  If I configure WAN first I can access the Web GUI.   IF I then configure LAN it will NOT ALLOW me to connect to the web gui on either interface.    IF I skip WAN and configure LAN it will not allow me to connect to the web gui even if i configure the WAN second.

I am not trying to change interfaces I have tried doing this every way and still nothing. 

Any ideas?  This is really getting frustrating. 
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: cookiemonster on December 01, 2022, 10:18:53 pm
This is a hardware appliance, right? Or a virtual machine? How many ports are there on it?
You should not need to do anything with any OPT interfaces at this point.
If you're following the normal setup and not working, I suspect something related to the hardware you're using. It would be good to know what it is or how is it connected to the rest of your setup.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: Patrick M. Hausen on December 01, 2022, 10:40:12 pm
What precisely are you configuring for LAN?
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 02, 2022, 05:51:52 pm
This is a hardware appliance, right? Or a virtual machine? How many ports are there on it?
You should not need to do anything with any OPT interfaces at this point.
If you're following the normal setup and not working, I suspect something related to the hardware you're using. It would be good to know what it is or how is it connected to the rest of your setup.

Hardware Appliance: Hardware as follows.
 X86 Fanless Mini PC Intel Celeron J4125 Quad Core 2x i226 Intel-V 2.5G Nics 16gb RAM. 256gb NVME.2 USB 3.O.  So 2 nic ports.   

Setup as follows:  Windstream Modem to  WAN PORT ( OPNsense Appliance ) --- LAN PORT (Unmanged Switch)  --- The rest of my network.

Windstream is static IP.   OPNSense is setup as static on WAN.  --- DHCP on LAN. --- Unamanged Switch -- ALL Clients setup to DHCP.

Hope this helps.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 02, 2022, 05:58:56 pm
What precisely are you configuring for LAN?

LAN port is configured default showing 192.168.1.1.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: cookiemonster on December 02, 2022, 06:02:16 pm
Yes it does.
And you are connecting to the appliance how during and after physical installation?
I wonder if you have your machine needing to renew the dhcp lease as it might have a different from the old assignment?
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: chemlud on December 02, 2022, 06:08:35 pm
I would not use the Wizard on first login. Simply abort it by pressing on the logo. Set your WAN to static manually, leave the LAN untouched (as it is apparently working, otherwise no GUI, or?) and see what happenz next...

Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 02, 2022, 06:10:18 pm
Yes it does.
And you are connecting to the appliance how during and after physical installation?
I wonder if you have your machine needing to renew the dhcp lease as it might have a different from the old assignment?

On Console,  It prompts for WAN first. Then  Connected indicates UP do the config  Then LAN connected indicates UP the do the config

At this point the Web GUI becomes unreachable.   Leaving only console with keyboard as root.

FYI When booting it gives no errors for hardware same with when I did the fresh install.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 02, 2022, 06:17:17 pm
I would not use the Wizard on first login. Simply abort it by pressing on the logo. Set your WAN to static manually, leave the LAN untouched (as it is apparently working, otherwise no GUI, or?) and see what happenz next...

OK, to be clear. I have tried console to setup. Web GUI will not connect even though it indicated as loaded. When both WAN and LAN as configured.

I tried the wizard AND if the WAN and LAN are configured the Web GUI will not connect even though it was Just working. IE on reload of the page or saving the changes.

Doing it with out the wizard via the Web GUI works fine until WAN and LAn are configured and again will not connect. 

IF I leave just LAN configured I can connect via the LAN side to the Web GUI.  Not problem but as soon as I bring up the WAN side and save it fails to connect. 

I have to be missing something easy or stupid.  I admit this is my first time out with OPNsense.

Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: cookiemonster on December 02, 2022, 07:02:54 pm
Right so you are still conneceted via the console to the same ip as the UI. Sorry I missed that before.
Surely is not that you are connecting with http instead of https and you've tried both, right?
What message do you get on the web-browser exactly?
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: clnutter1984 on December 02, 2022, 07:19:38 pm
Right so you are still conneceted via the console to the same ip as the UI. Sorry I missed that before.
Surely is not that you are connecting with http instead of https and you've tried both, right?
What message do you get on the web-browser exactly?

This is what I get when it fails to connect. 
Unable to connect

An error occurred during a connection to 192.168.1.1.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: cookiemonster on December 02, 2022, 10:40:33 pm
I see. I can only imagine a problem with getting from the pc/laptop to the device if console is OK. Browser Cookies, addons, that sort of thing if the connection is done in the same way ie. same cables, over the same path, etc.
Maybe the browser developer tools (Ctr+Shft+I) gives an indication. Network tab.

Failing that, we're going to have to dive into command lines. Both from client and opn shell. We could use Wireshark.
And I think the UI is lighttpd, so wouldn't hurt to see if the process is running and the log seems to be /var/log/lighttpd/latest.log
Title: Re: When adding LAN OPNSense Web GUI unreachable after addding it
Post by: EdwinKM on December 04, 2022, 02:40:35 am
please start (again) with a simple setup.
  Connect the first port directly wired to your computer.
  Second connector to WAN.

Follow the steps. It is basically next ...next...next. The WAN should show some "strange" internet IP and the LAN the 192.168.1.1.
Your pc should be able to connect to this IP. If not re-insert the UTP connector to force a DHCP request.

> IT first asks to configure WAN.  Then LAN.  If I configure WAN first I can access the Web GUI.   

Also noticed some remarks about accessing GUI on the WAN/Internet? This will not work. How is your cabling? Because your WAN should be one cable to your ISP (modem). So, you can not use this "strange" internet IP to access the GUI. You have to use 192.168.1.1.

Also noticed something about renaming OPT1 to LAN? Why are you doing this?