DNS connection problem with new build

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
I've experienced this problem before multiple times with FreeNAS, but cannot find the solution this time.

New build, no DNS ... so updates fail
Unable to connect to url https://update-master.ixsystems.com/FreeNAS/trains.txt: Automatic update check failed. Please check system network settings.

I can ping IP addresses (172.217.14.206), but can't ping google.com
ping: cannot resolve google.com: Host name lookup failure

Network summary states
Default routes 192.168.0.1 (correct)
Name servers 192.168.0.5 (correct) 127.0.0.1

Fields within the Global Configuration (network) are blank, yet making any changes does not resolve the problem

My /etc/resolv.conf is the following (created by DHCP)
#Generated by resolvconf
search local localdomain
nameserver 127.0.0.1

and of course that is a problem, and manually entering a correct nameserver to this file immediately fixes the problem, but a reboot resets the resolv.conf file back to how it was

it is probably an easy fix, but I can't find my solution and I've dealt with this multiple times before.

Thanking you in advance!
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
  1. Klick on the link
  2. Look at the picture
  3. Look in the picture for "nameserver1", "nameserver2", "nameserver3"
  4. Insert your nameserver there on your FreeNAS config
Hope that is a detailed enough explanation ;)
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
Sorry for not proving that information earlier, but that does not work.
Manually configuring the default gateway and nameservers in Network/ Global Configuration does not fix the problem

After setting the configuration of the default gateway and nameservers, my etc/resolv.conf still remains unchanged and again manually editing the resolv.conf file fixes the problem, but it does not survive a reboot as DHCP returns the values back to what it was.
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
The Network / Network Summary does list my name server correctly (yet still does not work)
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Ok. Now I understand you problem. You get 127.0.0.1 provided by the DHCP Server, which is strange. I guess you other devices get the correct nameservers provided via DHCP? I can't test it right now, if the nameserver settings (when set) should override the DHCP provided ones.

So maybe there is a problem with the DHCP server (of your router?), so that FreeNAS does not get the nameservers correctly provided.
Do you really need DHCP? A server is not a laptop which you connect regularly to different networks, so you could simply configure a static network config.
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
Changed to a static IP, but problem still exists.
Using Ubiquiti UniFi Security Gateway, but I recall the same problem existing when I used the Unifi EdgeRouter.

Again, Network Summary lists the gateway (192.168.0.1) and DNS server (192.168.0.5) correctly
But etc/resolv.conf does not have the DNS server entered; manually changing the resolv.conf file fixes the problem until the system is rebooted
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
OK - reinstalled FreeNAS, set static IP and then set default gateway and Nameserver config options in global configuration and it works
 

marcusdoc

Cadet
Joined
Mar 27, 2020
Messages
7
Reinstalled FreeNAS and same problem.
My previous fix did not work.

edited the .etc/resolv.conf file to change the nameserver IP address (set to nameserver 127.0.0.1)
nameserver 192.168.0.1
 

viaz

Cadet
Joined
Sep 26, 2018
Messages
1
Hi, new here and I have the same problem.

I just changed my network config for a Pi-Hole DNS and DHCP server.
I'm on FreeNAS-11.3-U4.1 and I lost all DNS resolution.

Changed the nameserver in FreeNAS network configuration pannel.
I could see the nameserver in /etc/resolv.conf but no resolution.

When i remove it from the web interface and add it back by nano /etc/resolv.conf, DNS work again (Thanks @marcusdoc)

What I find strange is it seems some part of the web interface still can resolv DNS but not every part...

This work for me for now but I hope it's a bug that will be corrected in the close futur.
 

nyxtyr

Dabbler
Joined
Jun 8, 2022
Messages
15
Has anyone solved this issue? In order for me to get my jail apps working again I have to

nano /etc/resolv.conf

Remove the 3 nameservers

Add

nameserver 8.8.8.8
nameserver 8.8.4.4

then everything is working fine
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
Has anyone solved this issue? In order for me to get my jail apps working again I have to

nano /etc/resolv.conf

Remove the 3 nameservers

Add

nameserver 8.8.8.8
nameserver 8.8.4.4

then everything is working fine
Use the webui to modify your nameserver configuration. It's part of network form. Changes via shell do not persist and are not recommended.
 

Tv6

Cadet
Joined
Sep 29, 2022
Messages
2
Use the webui to modify your nameserver configuration. It's part of network form. Changes via shell do not persist and are not recommended.
I have a similar problem with TrueNAS-13.0-U2.
My nameserver configuration does not survive a reboot. I have configured them via the webui.
 

danny36

Explorer
Joined
Nov 10, 2022
Messages
55
I have same problem, I have set a static ip, gateway and nameservers but I can't ping remote site and install plugins.
 

voidptr

Cadet
Joined
Dec 17, 2022
Messages
1
Same issue.
I only have an entry for an IPv6 DNS server, which does not seem to work.
The network settings in TrueNAS are correct and I use static network settings.
 

danny36

Explorer
Joined
Nov 10, 2022
Messages
55
in my case the mistake was mine, I had set a rule on router firewall to limit nat only for restricted ip address.
 

sirlouie

Cadet
Joined
Nov 14, 2022
Messages
3
FYI, if changing the network configuration via the WebUI doesn't work, consider hooking up a keyboard and monitor to your server and change the network configuration using the numbered options shown directly on the server. None of my WebUI updates made any difference, but fixing it via the numbered options on the server directly got all my dns resolutions and pings working perfectly.
 

mro512

Cadet
Joined
Jun 13, 2023
Messages
4
Same issue. resolvconf overwrites /etc/resolv.conf with nonsensical contents after upgrade to from 12 to TrueNAS-13.0-U4, breaking DNS resolution. On the GUI, the DNS configuration is set up properly but under Network/Network Summary a site-local IPv6 address is listed as nameserver.
 
Top