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 127.0.0.1 -p 1-9000

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s