How to List All Open / Listening Ports on a Server

You should open only limited ports for incoming and outgoing traffic on a server. You can use firewall like CSF firewall to open only trusted ports on a server.

If you want to check all open/listening ports that your server is using, run below command via SSH:

netstat -an


netstat -tulp


netstat -tulpn

The command will print a list of all open ports, protocol using the port, local address and foreign address (IP).

Our Recommended VPS Hosting

Leave us a Reply

Your email address will not be published. Required fields are marked *

* *