Netstat

To list all ports that a server is listening to:
sudo netstat -plnt