Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so... we know that we can test that if a port is open on the firewall with:


..but afaik there are services that can't be tested with telnet, because ex.: telnet doesn't know that protocol that the service is using, and telnet will report that the port is closed, but in reality the service is up&running.

Q: first: was I correct about telnet? second: What to use for testing that a port is opened on a server? (so it's not blocked by a firewall) - are there any unix tools for this?

share|improve this question
Have a look at nmap. It probably can do more than you will ever need. – Marco Jan 25 '13 at 15:58
up vote 3 down vote accepted

On the first question, maybe the service does not wait for interactive input. There could be other explanations, too. On the second, nmap can be used to test the firewall. There are many options.

Scan the first 1,000 ports (default):

nmap -v -A -PN hostname.domainname.com

Or perhaps a specific range:

nmap -v -A -p 10000-11000 -PN hostname.domainname.com
share|improve this answer
so you are saying that an: nmap -v -A -p PORTNUMBER -PN hostname.domainname.com is the best solution? – gasko peter Jan 25 '13 at 19:33
No, I just gave a couple of "for-instance" lines. You would have to read the manual and use the switches that perform the kind of action that you want to use. – Christopher Jan 25 '13 at 21:15

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.