1

I don't understand why I get "Bad destination address" in the end.

DNS works:

root@pc:~# nslookup foo.bar.local
Server:     127.0.1.1
Address:    127.0.1.1#53

Name:   foo.bar.local
Address: 10.100.71.28

Traceroute to IP works:

root@pc:~# tcptraceroute 10.100.71.28 443
Selected device eth1, address 172.17.6.82, port 34878 for outgoing packets
Tracing some path to 10.100.71.28 on TCP port 443 (https), 30 hops max
 1  172.17.6.254  0.401 ms  0.510 ms  0.402 ms
 2  10.130.4.2  0.941 ms  0.893 ms  0.800 ms
 3  * * *
 4  * * *
 5  10.100.63.11  17.915 ms  20.109 ms  17.054 ms
 6  10.100.71.28 [open]  22.654 ms  17.680 ms  21.081 ms

Tcptraceroute to hostname does not work ???

root@pc:~# tcptraceroute foo.bar.local 443
Bad destination address: foo.bar.local

Update

Other commands like ping or traceroute can't access foo.bar.local, too.

I get no output from this:

getent hosts foo.bar.local
guettli
  • 3,591
  • 17
  • 72
  • 123
  • Can other commands (apart from tcptraceroute) use that hostname? Is your system configured (in /etc/nsswitch.conf) to use DNS for hostname resolution? What does `getent hosts foo.bar.local` give? – Paul Haldane Jun 01 '17 at 10:13
  • @PaulHaldane thank you for the hint to `getent` this way I found the answer which I posted below. – guettli Jun 01 '17 at 10:31

1 Answers1

2

The command from the question reveal that DNS is working and IP networking is working.

What is wrong? :-)

Your operating systems does not directly connect to the DNS like nslookup does.

Name Service Switch does happen before the operating system asks the DNS if the command tcptraceroute foo.bar.local runs.

I fixed it like this:

diff -r /var/tmp/etc-saved/nsswitch.conf /etc/nsswitch.conf
11c11
< hosts:          files mdns4_minimal [NOTFOUND=return] dns
---
> hosts:          files dns
guettli
  • 3,591
  • 17
  • 72
  • 123