Please bear with me because I'm very new to using linux.

I'm trying to set my dns server on a clean install of ubuntu 18.04 but I can't seem to make it work. I just need to be able to ping my domain controller by hostname. Our dhcp server hands out a different dns than our primary domain controller so it must be set manually on devices (complex situation, has to be this way, don't ask) I:

1) installed ubuntu 18.04 LTS and did updates with software updater

2) went into settings > network > ipv4 > turned off automatic dns > and then set my dns servers (first ip is my primary domain controller, second ip is my secondary domain controller)

3) disabled ipv6

4) rebooted

I can ping my domain controller by ip, but not by hostname. If I nslookup my domain controller by hostname, it resolves with the correct dns server. I've had no issues on other linux distros, or on windows machines or osx machines.

My /etc/hosts file is as follows localhost my-machines-hostname

Any ideas here? Thanks in advance. Apologies because this is a probably a dumb question with a dumb answer, but I've tried googling. :p


Solved, I just had to put my dns server in /etc/hosts

What does setting dns with gui even do then? Nothing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.