.local domain cant be reached

hello since i am new to suse this is new to me and most google results are ubuntu specific


nslookup nas.local
Server:        192.168.2.1
Address:    192.168.2.1#53

Name:    nas.local
Address: 192.168.2.6


ping nas.local 
ping: nas.local: Name or service not known

but the https://nas.local/ never works for the suse machine, i dont have this problem on an ubuntu 16.04, debian 8 machine or windows 7 the host name is set on a openwrt router

what i am doing wrong ?

Check the /etc/nsswitch.conf configuration for host resolution mechanisms and order.

For reference, I have

~> grep hosts /etc/nsswitch.conf
hosts:          files mdns_minimal [NOTFOUND=return] dns

i get the same

grep hosts /etc/nsswitch.conf 
hosts:      files mdns_minimal [NOTFOUND=return] dns

Is Avahi active?

systemctl status avahi-daemon

Another thought I had…check the firewall

sudo firewall-cmd --list-all

By default it will be blocking mdns (UDP, port 5353). You can fire up the graphical ‘firewalld-config’ utility to check and make changes (it can also me launched from YaST), or if you are comfortable do it via a terminal…

Get active zone(s)…

firewall-cmd --get-active-zones

See which services are currently allowed…

firewall-cmd --list-all

Assuming public zone is active, you can add the mdns service like this

firewall-cmd --zone=public --add-service=mdns --permanent

then restart the firewall

systemctl restart firewalld

You should now be able to ping foo.local if present on your LAN.

You are using .local TLD for DNS and mDNS at the same time.

grep hosts /etc/nsswitch.conf 
hosts:      files mdns_minimal [NOTFOUND=return] dns

mDNS is assumed to be “authoritative” for .local pseudo-TLD, so if mDNS does not find answer further search is stopped so DNS is not consulted. nslookup does not use nsswitch.conf, it is pure DNS application, so it appears to work.

Note that this applies only to simple names - i.e. “foo.local” should be handled by mDNS while “foo.bar.local” should be considered as normal DNS name.

The best solution really depends on your overall infrastructure - are you in control of DNS resolution, can you easily change .local into something else, do you actually need mDNS resolution at all etc.

removing avahi solves the issue :good:

i will bump this thread because now i started a new project and i cant get into this VM from the opensuse TW box

  1. i can ping the ip and the domain.local from the opensuse TW box
  2. i can ssh on the machine from the opensuse TW box
  3. said machine has nginx up and running and a web interface, the web ui redirect over a self signed ssl and it can be accessed from other computers by simply adding on firefox a certificate exception
  4. from the opensuse TW box i cant access the web interface using the ip or the domain.local

what is happening in this case ?

mod should i bump this or make a new thread ?

Start a new thread if it’s a new issue.