script for unassigned ports

Hi Guys,

could you help me with this.

I need a script where if we enter the hostname and range of port numbers, the script must be able to give me the ports that were unassigned to any of the services installed.

Thanks,
Charan

You need to define the problem more clearly.

Hi Guys,

Our company uses IBM's testing servers. IBM has opened only a few ports for us but not all for the security reasons.(if we request a particular port IBM will open that port)

suppose, I enter the following command ( this is in windows)

  1. telnet 192.168.1.10 12001
    Connecting To 10.249.15.31...Could not open connection to the host, on port 8993 : Connect failed

In this case, it immediately says that it could not open connection to the host

  1. telnet 192.168.1.10 43000
    Connecting To 10.249.15.31...Could not open connection to the host, on port 8993 : Connect failed

the result is same but it takes more than 5 seconds to give the result

I couldn't get the same result in unix
it says connection refused immediately.

so, using this script, if we found that IBM has not opened a port for us to use, we request them to open that port.

One word: nmap.

could you please help me with the script

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.