Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I looking for way to find free ports on a remote machine without logging into remote server. How to do that?

share|improve this question

4 Answers 4

Nmap is often considered the universal choice for such endeavors.

share|improve this answer

I use: sudo nmap -p1-65535 -sV -O hostname

This will also enumerate the versions of the services running on the remote system (if it can). As far as the administrator caring about you port scanning the box, that used to be the case back in the day when a portscan was typically done by humans. Nowadays portscans are so often and mostly from bots that it isn't worth the admins time to follow up on them.

if you don't want to deal with root the following will scan every possible port:

nmap -p1-65535 hostname

share|improve this answer

There are so many ways to do that, you need to find a tool and scan the remote machine.However, for the consideration of security, more and more machine will drop those packets or alert the network administrator, because port scan is the preparation of intrusion.

share|improve this answer

There is no absolute way to do this. Tools such as nmap will find ports open to the network but won't reveal which ports are actually free, as it has no way to determine which ports are in use locally but not exposed to the network.

share|improve this answer
    
technically your answer is correct since the question is worded a bit unprecise. but i think the OP just wanted to know the ports visible to the outside world. –  akira Jan 27 '10 at 11:29
    
I just went by the question as posted and assumed nothing. Perhaps the OP can clarify. –  John Gardeniers Jan 27 '10 at 12:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.