5

I just want to understand the difference between :::: and 0.0.0.0. I believe both are same which let connection from outside if any processor is listening to that port.

udp        0      0 127.0.0.1:123               0.0.0.0:*
udp        0      0 0.0.0.0:123                 0.0.0.0:*
udp        0      0 :::32813                    :::*
tcp        0      0 :::5080                     :::*

migrated from stackoverflow.com Dec 5 '12 at 23:59

This question came from our site for professional and enthusiast programmers.

5

As you have correctly identified, an IPv4 address of 0.0.0.0 is a "catch-all" listen address.

:: is the short-form of 0:0:0:0:0:0:0:0, which is the equivalent address in IPv6. The third colon separates this address from the port number.

1

:: and 0.0.0.0 have the same meaning but in completely different context. They are not the same.

At the server side both are used to denote "no particular address" if you binding processes (not processor!) to some interface. :: is used in ipv6 0.0.0.0 is used in ipv4 context. One won't give you the another.

Please be aware that, the whole thing has nothing to do with "outside" connections. 0.0.0.0 (and ::) means: the server process do not care where the packet comes from. And that way it is bound to all interfaces (and addresses).

Leaving process bound to "no particular access" may impose some security issues (if you do not intend to publish the service to the outside) without proper firewall configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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