Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.local domain names not resolving on photon 3.0 #987

Open
8SKIN8 opened this issue Mar 15, 2020 · 7 comments
Open

.local domain names not resolving on photon 3.0 #987

8SKIN8 opened this issue Mar 15, 2020 · 7 comments
Labels

Comments

@8SKIN8
Copy link

8SKIN8 commented Mar 15, 2020

Unable to resolve company.local hostnames on photon 3.0. Editing nsswitch.conf does not seem to help.

@8SKIN8
Copy link
Author

8SKIN8 commented Mar 17, 2020

I was able to solve it using this...
https://askubuntu.com/questions/1068131/ubuntu-18-04-local-domain-dns-lookup-not-working

"I faced a very similar issue (if not exactly the same) on Linux Mint 19 (Tara). I've managed to solve it by combining 3 different pieces of information. It seems to all be related to recent changes with systemd-resolved.

First, yes I've needed to configure /etc/nsswitch.conf as you did and would expect. As long as dns comes before mdns you should be good. I ended with simply:

hosts: files dns myhostname
ref: https://unix.stackexchange.com/a/457172/271210

Prior to upgrading to this version of Mint, this is the only thing I needed to do. Now I also ended up making the below two other changes to get it working...

After that I've configured my search domain so systemd-resolved would work as I wanted. So I've edited the file /etc/systemd/resolved.conf, the Domains setting under the [resolve] section. In my case it ended up looking like:

[Resolve]
#DNS=
#FallbackDNS=
Domains=trilliant.local
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
ref: https://askubuntu.com/a/1031271/872881

I've also changed the avahi configuration to something else ("mdns" if I remember correctly, but it doesn't matter). It shouldn't be required however from my understanding. Just adding for completeness.

But none of it worked until I've called the following:

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
ref: https://askubuntu.com/a/938703/872881

After calling this, everything started working perfectly and as expected!"

@ssahani
Copy link
Contributor

ssahani commented Jul 10, 2020

you can add here if your interface is managed by systemd-networkd https://systemd.network/systemd.network.html#Domains=

@warroyo
Copy link

warroyo commented Jul 27, 2020

not sure if this is the same issue but I ran up against this and the fix was adding the search domain to both /etc/systemd/resolved.conf and to the interface itself which in my case was /etc/systemd/network/10-eth0.network and then restarting both services systemctl restart systemd-resolved && systemctl restart systemd-networkd

no need to add the symlink in this case

@gerguk
Copy link

gerguk commented May 6, 2021

My internal domain name is .local and I'm having the same issue.
We use VMware Unified Access Gateway (UAG) which are Photon OS. It's deployed via Powershell using an INI file to define the settings. The idea is that the UAG is production ready once deployed.
https://communities.vmware.com/t5/Horizon-Documents/Using-PowerShell-to-Deploy-VMware-Unified-Access-Gateway/ta-p/2782995
My DNS server hosts a lab.local zone and a .my-domain.com zone.
I can resolve host.my-domain.com, but noting in the lab.local zone.
If I use DIG I can resolve hostnames in lab.local.
root@dev-uag05 [ ~ ]# dig @192.168.99.1 ntp1.lab.local +short
dc01.lab.local.
192.168.99.1

This is problematic for a few reasons:
I would typically set my NTP and syslog servers using a DNS name, ntp1.lab.local, syslog1.lab.local etc.
From the UAG I would typically run troubleshooting commands that rely on DNS.

As .local is a common internal domain name used by organisations are there any plans to change this in the future?

root@greg-uag05 [ ~ ]# cat /etc/photon-release
VMware Photon OS 3.0
PHOTON_BUILD_NUMBER=11dd065

@ssahani
Copy link
Contributor

ssahani commented May 7, 2021

The .local domains are queried via Multicast DNS (mDNS) .

> resolvectl
Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: stub
Fallback DNS Servers: 1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844

Link 2 (ens192)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
     Protocols: +DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: xx
[Network]
MulticastDNS=yes

@ssahani ssahani added 3.0 photon release systemd network labels May 18, 2021
@tbrumleve
Copy link

Just ran into this issue on VMware Identity Manager 3.3.5.0 upgrade today. Our lab domain ends in .local and as expected DNS resolution is now broken in IM. I am trying a couple fixes mentioned here, as well as creating a new DNS zone for my lab.

@TheGabeMan
Copy link

Ran into the same issue and to solve it, the only thing you need to do is:
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants