9

When running netstat -a on my local machine, i see ports on the 0.0.0.0 address listening. I would assume that 0.0.0.0 is my local machine, except that i also see 127.0.0.1 listening to specific ports.

What is the 0.0.0.0 address? What is the difference between 0.0.0.0 and 127.0.0.1?

Below is an example of the output:

Proto  Local Address          Foreign Address        State
TCP    0.0.0.0:445            MyComputer1:0          LISTENING
TCP    0.0.0.0:49156          MyComputer1:0          LISTENING
TCP    0.0.0.0:49157          MyComputer1:0          LISTENING
TCP    127.0.0.1:6999         MyComputer1:0          LISTENING
TCP    127.0.0.1:6999         MyComputer1:49801      ESTABLISHED
TCP    127.0.0.1:6999         MyComputer1:57172      TIME_WAIT

1 Answer 1

12

Listening on 0.0.0.0 means that the program is listening on all IPv4 addresses assigned to the machine, whereas 127.0.0.1 is the loopback address, only accessible from the same machine.

3
  • Sweet, didn't know that.
    – Ciaran
    Feb 1, 2011 at 0:10
  • forgive my ignorance, but what is a loopback address? Feb 1, 2011 at 4:51
  • 1
    It's an address that loops back to the same machine it's on. Feb 1, 2011 at 4:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .