I discover a strange problem with ping localhost and I can not find out why.
with bind9 running:
in
/etc/hosts is defined
How can I find out, what is going wrong with "ping localhost"?
ping localhost with namserver bind9 running or without bind9 (stopped) gives me an external address.Webbroser: http://91.202.43.26/ goes to http://localhost.de$ ping localhost
PING localhost.de (91.202.43.26): 56 data bytes
64 bytes from 91.202.43.26: icmp_seq=0 ttl=114 time=6.841 ms
64 bytes from 91.202.43.26: icmp_seq=1 ttl=114 time=6.915 ms
$ ping -c2 localhost.de
PING localhost.de (91.202.43.26): 56 data bytes
64 bytes from 91.202.43.26: icmp_seq=0 ttl=114 time=6.838 ms
64 bytes from 91.202.43.26: icmp_seq=1 ttl=114 time=6.801 ms
ping -c2 127.0.0.1 -> "64 bytes from 127.0.0.1:..."with bind9 running:
$ nslookup localhost
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: localhost
Address: 127.0.0.1
Name: localhost
Address: ::1
$ nslookup 127.0.0.1
1.0.0.127.in-addr.arpa name = localhost.
$ dig @"my server IP" 127.0.0.1
; (1 server found)
;; global options: +cmd
;; Got answer:
...
;; QUESTION SECTION:
;127.0.0.1. IN A
$ dig @"my server IP" localhost
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57309
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 10800 IN A 127.0.0.1
in
/etc/hosts is defined
127.0.0.1 localhost localhost."myservername".de
...
::1 localhost localhost."myservername".de
How can I find out, what is going wrong with "ping localhost"?