This question already has an answer here:

When a port shows up in nmap or netstat I know its open and listening. But thing is, how do I know what other ports are actually open on my server, even though they may not be listening right now?

How can I view a complete list of all ports that are actually enabled even though they may not be listening or being used right now?

I'd like to shut down those, so not one can exploit them.

Right now, there 80 and that's Apache. What others are actually there but not being displayed. I'm on a VPS like AWS.

marked as duplicate by Rinzwind, Avinash Raj, souravc, waltinator, Seth Feb 15 '14 at 19:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • askubuntu.com/questions/9368/… – Rinzwind Feb 14 '14 at 15:54
  • If I've understood correctly, those will display ones that are listening. What if some ports are not listening right now? Those wont show up, right? How do I view those? – Norman Feb 14 '14 at 15:58

Browse other questions tagged or ask your own question.