0

I am not running a firewall on Ubuntu 23.04. Is it safe to assume that the only ports I have accessible via the internet are 443, 80, and 22?

netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN
tcp6       0      0 :::443                  :::*                    LISTEN
tcp6       0      0 :::80                   :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
udp        0      0 127.0.0.54:53           0.0.0.0:*
udp        0      0 127.0.0.53:53           0.0.0.0:*

Thank you!

  • 1
    This is a classic basic networking question. A Google search will provide you an immediate, clear answer: 127...* addresses are reserved for loopback interfaces, accessible by the local machine only and not routable. – user535733 Dec 03 '23 at 03:05
  • @user535733, I didn't know what to search for, but thank you for answering my question. – user1643244 Dec 03 '23 at 04:20

1 Answers1

0

For internet related stuff your first choice for information might be the IETF. In this case RFC5735 deals among other topics with local host addresses.

For your second question:

  • Ports 80 and 443 are accessible via IPv4.
  • Ports 22, 80 and 443 are accessible via IPv6.
  • All other ports are only accessible from your own IP instance (aka local host).

Cheers! Joerg

j k
  • 26