Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

telnet SERVERIP PORT

..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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.