Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
    
Sweet, didn't know that. –  Ciaran Feb 1 '11 at 0:10
    
forgive my ignorance, but what is a loopback address? –  contactmatt Feb 1 '11 at 4:51
    
It's an address that loops back to the same machine it's on. –  Ignacio Vazquez-Abrams Feb 1 '11 at 4:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.