-1
ss -lnt

State    Recv-Q    Send-Q        Local Address:Port        Peer Address:Port
LISTEN   0         128           127.0.0.53%lo:53               0.0.0.0:*
LISTEN   0         128                 0.0.0.0:22               0.0.0.0:*
LISTEN   0         128                    [::]:22                  [::]:*
LISTEN   0         128                       *:80                     *:*

I got this after performing the command ss. I only know that 0.0.0.0 is a wildcard for any IP address. However, I can't find any info about [::] and *:80.

Can you give me some info about that?

  • The caption tells you: "any port". – Thomas Dickey Oct 22 '18 at 8:47
3

Let's start with Address columns:

  • 0.0.0.0 is not a wildcard for any ip address. It is a wildcard for any ipv4 address.
  • [::] is a wildcard for any ipv6 address.
  • * is a wildcard for any ip address (both ipv4 and ipv6).

On the other side, in Port columns:

  • * is a wildcard for any port.

In your example:

The second line means than a program is listening, on local port 22 on any local ipv4 address, for a connection from any source port, from any ipv4 address.

LISTEN   0         128                 0.0.0.0:22               0.0.0.0:*

The third line means than a program is listening, on local port 22 on any local ipv6 address, for a connection from any source port, from any ipv6 address.

LISTEN   0         128                    [::]:22                  [::]:*

Note that a line as follows is functionally equivalent to the sum of the 2nd and 3rd line of your example. The difference is probably that your ssh daemon called two times the listen system call, one time for each class of ip address (ipv4 and ipv6).

LISTEN   0         128                       *:22                     *:*

The forth line of your example shows that your web server daemon called listen once, for both classes of IP address simultaneously.

LISTEN   0         128                       *:80                     *:*

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.