Share via


DNS not working on ubuntu Azure VM

Question

Tuesday, May 29, 2018 3:11 PM

Hi,

I have assigned custom on-premise DC IPs as DNS servers to Ubuntu VM, but can not resolve any internal FQDNs from internal network.

Windows Azure servers under same subscription are able to resolve internal IPs and are joined to on-premise domain.

Any suggestions?

Thanks

All replies (6)

Tuesday, May 29, 2018 5:34 PM

Could you help us what does dig<any internal domain name> give as output?

What does etc/resolv.conf have?

Do you get any error message while trying to do a dns resolution from the ubuntu vm? if yes, help us with the error message.

Also, suggest you to refer the article.


Wednesday, May 30, 2018 6:42 AM

Hi Nirushi, 

Output for dig and resolv.conf looks good. 10.10.10.18 and 10.10.10.19 are our DCs.

user@ubuntu:~$ dig company.local

; <<>> DiG 9.10.3-P4-Ubuntu <<>> company.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62152
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;company.local.             IN      A

;; ANSWER SECTION:
company.local.      600     IN      A       10.10.10.18
company.local.      600     IN      A       10.10.10.19

;; Query time: 11 msec
;; SERVER: 10.10.10.18#53(10.10.10.18)
;; WHEN: Wed May 30 07:22:12 BST 2018
;; MSG SIZE  rcvd: 94

user@ubuntu:~$ cat /etc/resolv.conf
nameserver 10.10.10.18
search company.local

user@ubuntu:~$ ping company.local
ping: unknown host company.local

I checked your link but not sure where to start troubleshooting as I only point to on-premise DCs through VPN. Just thinking if Azure Client is involved here?

Thanks
N


Wednesday, May 30, 2018 8:16 AM

Another question should Applied DNS Servers that are displayed on Azure Virtual Network DNS section should reflect somewhere in Linux VM (e.g. /etc/resolv.conf)?

Thanks
N


Wednesday, May 30, 2018 8:22 AM

After running "sudo dpkg-reconfigure resolvconf" now I can see name servers from Virtual Network reflected in resolv.conf, but name resolution for internal FQDNs still not working


Wednesday, May 30, 2018 9:29 AM

Solution was change /etc/nsswitch.conf

#hosts:          files mdns4_minimal [NOTFOUND=return] dns

To:

hosts:          files dns


Wednesday, May 30, 2018 5:21 PM

Glad to know issue got resolved and thank you for sharing the solution this might help other users.