OPNsense Forum

English Forums => General Discussion => Topic started by: aamhm on September 04, 2023, 04:22:14 pm

Title: DNS issue with OPNsense
Post by: aamhm on September 04, 2023, 04:22:14 pm
hello guys

i have a test enviroment LAN & WAN on Virtual box ,and LAN is connect to host only , and another virtual machine with linux os ,I can ping 8.8.8.8 and I can ping www.google.com on OPNsense with no problem ,so the DNS is working on OPNsense ,but on linux ,I can ping 8.8.8.8 and I can go to web site with IP address only but when I ping www.google.com or visit www.google.com ,I cannot reach it ,so what is my the problem with OPNsense ,I also make my linux VirtualBox to bridget and use my home network it works fine I can ping www.google.com and can access webpage with names like www.yahoo.com.

so what I have miss on OPNsense to configure and make it work with my guess os linux
Thanks
Title: Re: DNS issue with OPNsense
Post by: CJ on September 05, 2023, 02:53:36 pm
How did you set up OPNSense?  Have you changed anything from the install?

What happens when you go to Interfaces: Diagnostics: DNS Lookup and put in www.google.com?  Leave the server field blank.

What does your client /etc/resolv.conf look like?
Title: Re: DNS issue with OPNsense
Post by: aamhm on September 09, 2023, 09:29:38 am
i fixed alone when i change the DHCP of WAN instead of Static ,and it works
in the server OPNsense ,I was able to ping www.google.com but on the workstation behind the LAN does not ,only ping IP addresses not by names for Example : I can ping 8.8.8.8 google DNS but cannot ping www.google.com or www.yahoo.com or anything with name.
anyway I fixed it ,thanks
Title: Re: DNS issue with OPNsense
Post by: CJ on September 20, 2023, 02:26:15 pm
It's a bit hard to understand what you're saying, but I think I have an idea what happened.

If you had your WAN as static instead of DHCP then you weren't getting DNS servers from your WAN.  OPNSense resolution was working because Unbound defaults to recursive root mode.  Your clients weren't because the local Unbound wasn't being passed to the clients via DHCP.

I forget the default options but you can certainly end up in this spot with the wrong settings.
Title: Re: DNS issue with OPNsense
Post by: aamhm on September 20, 2023, 03:25:17 pm
It's a bit hard to understand what you're saying, but I think I have an idea what happened.

If you had your WAN as static instead of DHCP then you weren't getting DNS servers from your WAN.  OPNSense resolution was working because Unbound defaults to recursive root mode.  Your clients weren't because the local Unbound wasn't being passed to the clients via DHCP.

I forget the default options but you can certainly end up in this spot with the wrong settings.

you are right ,but it didn't know how to fix it.
thanks for reply