Identifying linux server ports in use

Some days back I was facing an interesting problem. We have multiple tomcat instances configured on a single Linux box. The box was configured to have more than one internal ips. I needed to know which ports were active. Did some browsing on the net (essentially did a google search ;-)) and found a Linux command nmap.

Used the following command

nmap -sT -p

For example:

nmap -sT -p 1-9000

This is the command to check ports from 1 to 9000 on the server There is a -sS option available for users with root privileges but myself a lowly developer does not enjoy such rights.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s