Linux Security: List Listening Ports

There are a few ways to list all ports open and to show which daemons are listening. Simply run one of the two commands:

# lsof -i | grep "(LISTEN)"

Example output

image

-or-

# netstat -tupan | grep "LISTEN"

I believe this to be a cleaner output
image

Leave a Reply

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