0

The domain name debian.debian point to 127.0.0.1

$ ping debian.debian
PING debian.debian (127.0.1.1) 56(84) bytes of data.
64 bytes from debian.debian (127.0.1.1): icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from debian.debian (127.0.1.1): icmp_seq=2 ttl=64 time=0.046 ms

Scan my localhost to get different result, why?

debian@debian:~$ sudo nmap  debian.debian
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-15 09:56 HKT
Nmap scan report for debian.debian (127.0.1.1)
Host is up (0.0000050s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds

debian@debian:~$ sudo nmap  127.0.0.1
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-15 09:56 HKT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000050s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
25/tcp   open  smtp
53/tcp   open  domain
80/tcp   open  http
631/tcp  open  ipp
5432/tcp open  postgresql

Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds

I knew why debian.debian point to 127.0.1.1.
Update:to add a question
Why http service is running on both 127.0.0.1 and 127.0.1.1?Why other services are running only on 127.0.0.1 instead of 127.0.1.1?

3
  • 2
    You say 127.0.0.1 but your output says 127.0.1.1 - that's not the same... Commented Oct 15, 2022 at 2:10
  • 1
    Following @StephenHarris comment, take a look at this. Commented Oct 15, 2022 at 2:24
  • Are you asking how to find out what TCP ports are being listened to (for incoming connections) on your computer? Try sudo netstat -lnt. Commented Oct 15, 2022 at 11:43

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.