By writing in my shell the instruction that displays all the connections that my computer has, I realize that some IPs are displayed like this: 0.0.0.0, *:*, [::], [::1] and even stranger, on some ports no port is specified or all simply zero... If there is no port or just no IP, why does the computer display this to me as a connection ?
1 Answers
I am guessing that the instruction is some form of netstat command. (Please include the actual command, however. We're not mind readers.)
Connections to
[::1]are normal: it is the IPv6 address of localhost, equal to127.0.0.1in IPv4. Many programs use such loopback connections internally, for communication between their own components.Both
[::]and0.0.0.0are "wildcard" addresses and mean the address isn't known yet. This means the line does not actually represent an active connection.Netstat doesn't just show connections; it also shows sockets which are listening – that is, waiting to receive an incoming connection. Such sockets don't have a remote address because they don't know what host will connect in the future.
Therefore the all-zeros ("any" or "null" or "unspecified") remote address is shown instead. (But many netstat-like programs just show a blank field instead.)
For 'listening' sockets, the local address may be all-zero for the same reason.
A computer may have multiple IP addresses (indeed most have at least two: the loopback address and the LAN address), and a 'listening' socket may be configured to wait for connections made either to any of those addresses, or just a specific address. (That is, bound to a specific local address.)
Most listening sockets aren't bound to any specific local address; they'll accept all connections. Because the local address is unspecified, it is shown as all-zeros as well.
- 501,077