Search code examples
netstat

netstat command local address format


I have below netstat -ao result.

Proto  Local Address
TCP    0.0.0.0:22
TCP    127.0.0.1:3306
TCP    165.120.144.11:139
TCP    [::]:80

In this result what does IP 0.0.0.0, 127.0.0.1, 165.120.144.11 and [::] indicates?


Solution

  • 0.0.0.0 is the wildcard address - which means your machine is listening on port 22 (SSH) on all interfaces/IP addresses that it can see.

    [::] is another way to represent this for IPv6.

    127.0.0.1 is the loopback address; which means your machine is listening on port 3306 (MySQL) on localhost only.

    165.20.144.11 is most likely your external/internet facing IP address.