Link to home
Start Free TrialLog in
Avatar of David King
David KingFlag for United States of America

asked on

How do I use my Windows DNS server on my .local domain

I am setting up a UBUNTU 20.04 vm and I am having an issue with the DNS. I can lookup external machines like www.yahoo.com just fine. But if I want to look up my local machine on my .local network like accounting.mydomain.local it will not do a name lookup. How can I set the Ubuntu vm so it uses my Windows DNS server on mydomain.local to do name resolution for local domain machines?   I am a bit confused on which file to modify and where.

Here is the info I have for the setting so far.
User generated image
Avatar of Muhammad Burhan
Muhammad Burhan
Flag of Pakistan image

so what the error is displayed when you ask for 'accounting.lipman.local' ?
is 10.100.10.40 is a windwos DNS or .75 ?
Avatar of dfke
dfke

Hi,

you can use Dnsmasq as an alternative DNS forwarder (and optionally DHCP and TFTP) service. Dnsmasq uses the /etc/hosts so it can serve the names of local machines which are not in the global DNS.

Cheers
Avatar of David King

ASKER

I can PING my Windows domain DNS server with no errors.
When I try to ping it by NAME I get the error message;" Temporary failure in name resolution"
I have too many machines on my network to use a host file as a solution.
I also tried this;
nano /etc/resolvconf/resolv.conf.d/base
I entered my name server name and ip numbers ,   lp-da16.lipman.local  10.100.10.40
Saved the file.
When I tried to enter: sudo resolvconf -u
I got another error;
Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

Any other suggestions?  Ubuntu 20.04 lts

Hi,

/etc/resolv.conf is typically the place where you define your DNS servers. So you can just edit /etc/resolv.conf and add your DNS servers and save the file.

After that you need to restart systemd-resolved:

$ sudo systemctl restart systemd-resolved.service

Open in new window


Cheers
I created a new resolv.conf  in my /etc directory with domainName IPNumber and saved it.
Ran the restart command you show. Ran without error. Came back quick.
Tried to ping using name...Same Error.
"Temporary failure in name resolution"

Hi,

you don't need to add the hostname of your DNS server. Just add:

nameserver 10.100.10.40 

Open in new window


Cheers
Here is a dump of some of my settings . Is it possible that the local thing listed at the bottom of the dump might be interfering with domain.local lookups?  As you can see in the dump. My DNS server is listed in the config.
?
User generated image
And... AM I allowed to edit the /etc/resolv.conf file directly ? I see warnings about doing it there?

ASKER CERTIFIED SOLUTION
Avatar of David King
David King
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Great to see your issue solved. Well done!

Cheers