OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: guest42453 on January 24, 2024, 08:22:04 PM

Title: Need Setup Config Help
Post by: guest42453 on January 24, 2024, 08:22:04 PM
hi,

New to OPNSense, I installed OPNSense to default setting and I am having an issue connecting to the internet. i have opnsense setup as a second router behind my main router. I set opnsense this way so i can learn how to use it and eventually replace it as my main router.  I have read previous topics, still having trouble.
My set up is my modem, main router, then to a main switch that goes out the rest of the house for access points, tv etc., then protectli vp2420 connect to a pc.

Setup:

Modem-netgear orbi router-switch-protecli VP2420-PC

LAN on protectli is 192.168.20.1
WAN on main network 192.168.10.42

thanks in advance
Title: Re: Need Setup Config Help
Post by: CJ on January 25, 2024, 03:19:11 PM
Is OPNsense getting an IP from the Orbi?  Not connecting to the internet is very vague and you have to start checking all of the various pieces to narrow things down.  What exactly isn't working?
Title: Re: Need Setup Config Help
Post by: guest42453 on January 25, 2024, 08:13:54 PM
I get an IP address from Orbi to OPNsense. I ran a ping test from OPNsense to Orbi with 0 percent packet loss. I did a ping test from OPNsense to the pc connected on LAN and got 0 percent packet loss. I can access the GUI on OPNsense. When I look at the dashboard under gateways, the WAN_DHCP has an IP address and the status says it is online. When I look at the interface on the dashboard I get an IP address on WAN and LAN. I try to access the internet with the PC connected to the LAN on OPNsense it say it can't find a DNS. So I'm starting think that's part of the problem. I have also rebooted all devices several times, changed out different cables, moved cables between different ports. I never changed or created any firewall rules or anything like that.
Title: Re: Need Setup Config Help
Post by: CJ on January 26, 2024, 06:24:10 PM
To make sure I understand, this is the configuration you have and you are testing only from this PC that is directly connected to the Protectli.

Internet -> Orbi -> Protectli -> PC

The Orbi is getting a public IP from your ISP and serving the DHCP range of 192.168.10.0/24.
The Protectli is getting 192.168.10.42 from the Orbi and serving the DHCP range of 192.168.20.0/24.

What IP is the PC getting?  What does it show for DNS servers?

What does OPNsense show when you go to Interfaces -> Diagnostics -> DNS Lookup and put in google.com for the hostname and leave the server blank?
Title: Re: Need Setup Config Help
Post by: guest42453 on January 26, 2024, 09:44:26 PM
Yes, that is the current set up I have.

The IP for the PC is 192.168.20.180

DNS Lookup gives

Type A
google.com.1 IN A 142.251.32.14
Server 192.168.10.1
15 msec
Title: Re: Need Setup Config Help
Post by: CJ on January 27, 2024, 03:05:07 PM
What DNS settings does the PC show?  If windows, you can run the command "ipconfig /all".
Title: Re: Need Setup Config Help
Post by: guest42453 on January 27, 2024, 05:32:30 PM
This is what i get for DNS settings.

IPv4 Address....1982.168.20.10
DHCP Server....192.168.20.1
DNS Server.....192.168.20.1
Title: Re: Need Setup Config Help
Post by: CJ on January 28, 2024, 04:27:05 PM
Run these two commands on the PC and paste the output.

nslookup google.com
nslookup google.com 192.168.10.1

Can you post a screenshot of the Networking section of your System->General page?
Title: Re: Need Setup Config Help
Post by: guest42453 on January 29, 2024, 12:16:49 AM
 nslookup google.com

Server: OPNsense.Home
Address: 192.168.10.1

nslookup google.com 192.168.10.1

Server: unknown
Address: 192.168.10.1

Non-authoritative answer:
Name: google.com
Addresses: 2607:f8b0:4009:819::200e
                 142.251.32.14


Title: Re: Need Setup Config Help
Post by: CJ on January 30, 2024, 08:46:48 PM
That picture is helpful, but that's not what I was asking.  In the OPNsense UI, click on System on the left and then General.  If you scroll down there is a Networking section of the UI.  That's what I need the screenshot of.
Title: Re: Need Setup Config Help
Post by: guest42453 on January 30, 2024, 09:20:29 PM
Sorry, must of misunderstood what you were saying.

Here is OPNsense system-general-network section of UI
Title: Re: Need Setup Config Help
Post by: CJ on January 31, 2024, 06:25:28 PM
Okay.  What do you have under Services -> Unbound -> Query Forwarding and DNS over TLS?

Can you also post a screenshot of the windows command prompt where you ran nslookup google.com?
Title: Re: Need Setup Config Help
Post by: guest42453 on January 31, 2024, 08:27:27 PM
Here are my results for Services -> Unbound -> Query Forwarding and DNS over TLS and  ran nslookup google.com
Title: Re: Need Setup Config Help
Post by: CJ on February 03, 2024, 08:11:47 PM
If you want the quick fix just to get it working, check the Use system nameservers on the Query Forwarding screen.

If you want to continue troubleshooting the issue, please post the Unbound logs.
Title: Re: Need Setup Config Help
Post by: guest42453 on February 03, 2024, 09:00:51 PM
Checking the nameservers on Query Forwarding fixed the problem. I now have internet access.

Thank you. I really appreciate the help with fixing the problem.
Title: Re: Need Setup Config Help
Post by: CJ on February 08, 2024, 07:41:02 PM
Quote from: mgk4 on February 03, 2024, 09:00:51 PM
Checking the nameservers on Query Forwarding fixed the problem. I now have internet access.

Thank you. I really appreciate the help with fixing the problem.

Your problem isn't really fixed, just had a bandaid applied.  The issue is that Unbound isn't working correctly in recursive mode.  That's still the case.  What you did changed it from recursive to forwarder mode.

Depending on your use case, you may want it to be working as a forwarder instead of recursive.  But it's still a good idea to figure out why recursive mode is broken.
Title: Re: Need Setup Config Help
Post by: guest42453 on February 08, 2024, 08:33:54 PM
What would need to be done to fix unbound to work properly? If i left it "as is" would that cause security issues?

My end goal would be to make OPNsense my main router, after i learn how to use it.
Title: Re: Need Setup Config Help
Post by: CJ on February 09, 2024, 09:59:14 PM
Quote from: mgk4 on February 08, 2024, 08:33:54 PM
What would need to be done to fix unbound to work properly? If i left it "as is" would that cause security issues?

My end goal would be to make OPNsense my main router, after i learn how to use it.

No idea as we don't know why it's not working.  And you also skipped providing several pieces of info I've asked for at various times so it's hard to even venture a guess.

I don't use Unbound in recursive mode but I also use DoT for my upstream.