ping/ssh to unknown name resolves back to my own machine
by erik2282 from LinuxQuestions.org on (#51QJJ)
Code:root@ipa:~# ping madeupserver
PING madeupserver(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.032 ms
64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.037 ms
^C
root@ipa:~# ssh root@madeupserver
The authenticity of host 'madeupserver (::1)' can't be established.
ECDSA key fingerprint is SHA256:cNF4m4nZFctfoa3/QG/v8j+ipmhwDvkiU2hzX8j46do.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'madeupserver' (ECDSA) to the list of known hosts.
root@madeupserver's password:
Linux ipa 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Apr 4 16:56:28 2020 from ::1
root@ipa:~# exit
logout
Connection to madeupserver closed.
root@ipa:~# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ipa.localhost ipa
172.16.108.75 topaz
172.16.12.50 tethra
172.16.12.60 cube
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@ipa:~# cat /etc/resolv.conf
domain localhost
search localhost
nameserver 10.20.1.1Code:root@ipa:~# systemctl status NetworkManager
a- NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:NetworkManager(8
root@ipa:~# systemctl status networking
a- networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2020-04-04 16:51:39 CDT; 19min ago
Docs: man:interfaces(5)
Process: 651 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
Main PID: 651 (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 4915)
Memory: 16.1M
CGroup: /system.slice/networking.service
a""a"679 /sbin/dhclient -4 -v -i -pf /run/dhclient.enp3s0.pid -lf /var/lib/dhcp/dhclient.enp3s0.leases -I -df /var/lib/dhcp/dhclient6.enp3s0.leases enp3s0
Apr 04 16:51:39 ipa ifup[651]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 11
Apr 04 16:51:39 ipa ifup[651]: DHCPOFFER of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa ifup[651]: DHCPREQUEST for 10.20.1.15 on enp3s0 to 255.255.255.255 port 67
Apr 04 16:51:39 ipa ifup[651]: DHCPACK of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: DHCPOFFER of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: DHCPREQUEST for 10.20.1.15 on enp3s0 to 255.255.255.255 port 67
Apr 04 16:51:39 ipa dhclient[679]: DHCPACK of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: bound to 10.20.1.15 -- renewal in 3085 seconds.
Apr 04 16:51:39 ipa ifup[651]: bound to 10.20.1.15 -- renewal in 3085 seconds.
Apr 04 16:51:39 ipa systemd[1]: Started Raise network interfaces.Below, dsnas is a device on my lan.
Code:root@ipa:~# ping dsnas
PING dsnas.localhost (10.20.1.14) 56(84) bytes of data.
64 bytes from dsnas.localhost (10.20.1.14): icmp_seq=1 ttl=64 time=0.186 ms
64 bytes from dsnas.localhost (10.20.1.14): icmp_seq=2 ttl=64 time=0.158 ms
I'd like it to behave normally so that when I ping a non-existant hostname in my lan, nothing pings. I've tried commenting out the "127.0.0.1 localhost" line in hosts file but made no difference.
Thanks.


PING madeupserver(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.032 ms
64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.037 ms
^C
root@ipa:~# ssh root@madeupserver
The authenticity of host 'madeupserver (::1)' can't be established.
ECDSA key fingerprint is SHA256:cNF4m4nZFctfoa3/QG/v8j+ipmhwDvkiU2hzX8j46do.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'madeupserver' (ECDSA) to the list of known hosts.
root@madeupserver's password:
Linux ipa 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Apr 4 16:56:28 2020 from ::1
root@ipa:~# exit
logout
Connection to madeupserver closed.
root@ipa:~# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ipa.localhost ipa
172.16.108.75 topaz
172.16.12.50 tethra
172.16.12.60 cube
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@ipa:~# cat /etc/resolv.conf
domain localhost
search localhost
nameserver 10.20.1.1Code:root@ipa:~# systemctl status NetworkManager
a- NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:NetworkManager(8
root@ipa:~# systemctl status networking
a- networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2020-04-04 16:51:39 CDT; 19min ago
Docs: man:interfaces(5)
Process: 651 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
Main PID: 651 (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 4915)
Memory: 16.1M
CGroup: /system.slice/networking.service
a""a"679 /sbin/dhclient -4 -v -i -pf /run/dhclient.enp3s0.pid -lf /var/lib/dhcp/dhclient.enp3s0.leases -I -df /var/lib/dhcp/dhclient6.enp3s0.leases enp3s0
Apr 04 16:51:39 ipa ifup[651]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 11
Apr 04 16:51:39 ipa ifup[651]: DHCPOFFER of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa ifup[651]: DHCPREQUEST for 10.20.1.15 on enp3s0 to 255.255.255.255 port 67
Apr 04 16:51:39 ipa ifup[651]: DHCPACK of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: DHCPOFFER of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: DHCPREQUEST for 10.20.1.15 on enp3s0 to 255.255.255.255 port 67
Apr 04 16:51:39 ipa dhclient[679]: DHCPACK of 10.20.1.15 from 10.20.1.1
Apr 04 16:51:39 ipa dhclient[679]: bound to 10.20.1.15 -- renewal in 3085 seconds.
Apr 04 16:51:39 ipa ifup[651]: bound to 10.20.1.15 -- renewal in 3085 seconds.
Apr 04 16:51:39 ipa systemd[1]: Started Raise network interfaces.Below, dsnas is a device on my lan.
Code:root@ipa:~# ping dsnas
PING dsnas.localhost (10.20.1.14) 56(84) bytes of data.
64 bytes from dsnas.localhost (10.20.1.14): icmp_seq=1 ttl=64 time=0.186 ms
64 bytes from dsnas.localhost (10.20.1.14): icmp_seq=2 ttl=64 time=0.158 ms
I'd like it to behave normally so that when I ping a non-existant hostname in my lan, nothing pings. I've tried commenting out the "127.0.0.1 localhost" line in hosts file but made no difference.
Thanks.