What is the difference between :::: and 0.0.0.0 from the netstat -an output?
Solution 1
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.
Solution 2
::
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.
Related videos on Youtube
user1595858
Updated on September 18, 2022Comments
-
user1595858 almost 2 years
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 :::*