-1

I have a server named site.dpt.myorg.local, which i want to access both with short name and with fqdn. When i try to use short site or site.dpt form, everything works just fine. However when i use fqdn - lookup works when using dig or nslookup, but fails when i use web browser, ssh and other tools.

I.e. ssh and ping fail with following error:

$ ssh -vvvv site.dpt.myorg.local
OpenSSH_7.2p2, OpenSSL 1.0.2j-fips  26 Sep 2016
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 25: Applying options for *
debug2: resolving "site.dpt.myorg.local" port 22
ssh: Could not resolve hostname site.dpt.myorg.local: Name or service not known

$ ping site.dpt.myorg.local
ping: unknown host site.dpt.myorg.local

I have a following resolv.conf file:

search myorg.local dpt.myorg.local
nameserver 10.0.0.1
nameserver 10.0.0.2

My OS is Opensuse 42.3

Can anyone point me to the cause of this problem? Thanks!

Andrew
  • 228
  • 3
  • 12
  • Are your nameservers configured to handle `dpt.myorg.local`? – Sven Aug 22 '17 at 14:01
  • Yeah, nameservers are correct, i'm pinging the same full addresses from other machines in network just fine. On a test centos 6 box with same resolv.conf i can use all hostname forms – Andrew Aug 22 '17 at 14:46

2 Answers2

1

I found the answer to my question: https://superuser.com/questions/704785/avahi-ping-cant-resolve-hostname-but-nslookup-can

the problem was in avahi service, configured by default for .local domain. fixing part of /etc/avahi/avahi-daemon.conf as

[server]
domain-name=.alocal

solved my problem.

Edit: Ended by disabling avahi since i had no need in it in my environment.

Andrew
  • 228
  • 3
  • 12
  • I think it's worth noting that the proper solution is to stop abusing `local` rather than changing avahi (or other mDNS implementation of choice) to operate in nonstandard ways or disabling it entirely (which might be a slightly cleaner middle ground). – Håkan Lindqvist Aug 22 '17 at 17:19
0

The local TLD is reserved for use with mDNS and should not be used with regular DNS.

The proper solution would be to stop misusing local in this way.

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94