Host name lookup failure (DNS is not working properly)

Delijohn

Cadet
Joined
Jun 19, 2019
Messages
5
Hello,

I just installed FreeNAS at a new machine and i'm trying to do some basic settings. Although I did all the steps to connect it with my Active Directory and get the users, I realized that it's not working properly.
I chose my DNS and my gateway but I have no network.
Of course, when I try to ping from the Shell anything at the outside, i see the "Host name lookup failure".

This is my current setup:
1560952027254.png


My AD is the 192.168.1.220. Instead of "local", I tried to "name" it properly, as its actual name but this is not working either. What's the best way to set it up or is the a guide than I can follow and check what is wrong??

Thank you for your time!
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
The Nameserver fields are looking for a Domain Name Server (DNS) entry, and not your AD IP.
 

Delijohn

Cadet
Joined
Jun 19, 2019
Messages
5
Small update on this.
When the setup is like this, it's not working. So from the Shell, it still says "host name lookup failure".
1561024311878.png

1561024144256.png


Workaround? I use the Shell to go in the etc/resolv.conf with nano and edit it manually.
So when i get inside, it says:
1561024441193.png

and then i make it look like:
1561024513093.png


then i exit and save.
And then of course it works:
1561024552324.png


Annoying part?
After a restart the issue is still there. Do I need to put this setup at the startup of the machine somewhere?
:rolleyes:
 
D

dlavigne

Guest
It should save correctly when using the UI. Which FreeNAS version are you using that is not saving?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
When you have only 127.0.0.1 as the only entry in /etc/resolv.conf, it's a strong indication that you configured the Domain Controller service rather than the AD Directory Services. The former configures an AD Domain Controller, the latter is for joining an existing AD domain as a member server. It is configured under Directory Services-> Active Directory.
 

Delijohn

Cadet
Joined
Jun 19, 2019
Messages
5
It should save correctly when using the UI. Which FreeNAS version are you using that is not saving?
It was using the U4 and I just updated to the U5 (latest). I'll try to configure it again, since after the restart of the upgrade, i'm without DNS again.

When you have only 127.0.0.1 as the only entry in /etc/resolv.conf, it's a strong indication that you configured the Domain Controller service rather than the AD Directory Services. The former configures an AD Domain Controller, the latter is for joining an existing AD domain as a member server. It is configured under Directory Services-> Active Directory.

Is there a way to check easily if that's the case? I just want to connect to an existing AD. I don't want to set up another DC.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
It was using the U4 and I just updated to the U5 (latest). I'll try to configure it again, since after the restart of the upgrade, i'm without DNS again.



Is there a way to check easily if that's the case? I just want to connect to an existing AD. I don't want to set up another DC.
There is a "domain controller" service in the services tab. It should be turned off and the "start on boot" checkbox should be unchecked.
 

Delijohn

Cadet
Joined
Jun 19, 2019
Messages
5
There is a "domain controller" service in the services tab. It should be turned off and the "start on boot" checkbox should be unchecked.
it's off :)
I changed also the resolv.conf file again and restart and it seems that now it keeps the settings. So problem solved.
Now I cannot connect to the AD and enable SMB, but i'll open another thread if necessary.
Thanks to both of you!
 

sirlouie

Cadet
Joined
Nov 14, 2022
Messages
3
All, I have been spending two days on solving this and other related problems. At one point, I couldn't install plugins because I got a "pkg.freebsd.com could not be reached via DNS" error message. Pinging it gave me the "host name lookup failure" error. I made sure I had a Default Gateway and Nameserver under Network -> Global Configuration. I didn't have a Domain Controller, or its service. Hacking /etc/resolv.conf didn't even work. I even changed my router from a Netgear 192.168.x.x to pfSense 10.x.x.x, updated my network configuration in the GUI, and still nothing.

I was messing around and accidentally put in an incorrect static route into TrueNAS, and I lost access to my console. I hooked up a monitor and keyboard directly to the server, and then used the numbered options to properly adjust all the settings (resetting the route, setting the IP address, setting the Gateway and Nameservers). When I did this, everything started working (even though I used the same settings).

I'm guessing there was an issue that wasn't showing or updating with the GUI, which fixed itself when I used the reconfiguration options directly on the physical machine.

So if you're having a weird networking problem like this, consider trying to manually set the options using the non-gui numbered options that you see when you directly connect a monitor and keyboard to the physical machine.
 
Top