I'm testing some vulnerabilities on a machine which has the port 22333 opened (it's used as the ssh port, and I can connect to it without any problem and the telned command get connected):
$ telnet x.x.x.x 22333
Trying x.x.x.x...
Connected to x.x.x.x.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
But when I use nmap against that machine, it doesn't detect that port to be listened to:
$ sudo nmap -p 22000-23000 -sT x.x.x.x
Starting Nmap 6.00 ( http://nmap.org ) at 2015-06-03 19:54 CEST
Nmap scan report for x.x.x.x
Host is up (0.00014s latency).
All 1001 scanned ports on x.x.x.x are filtered
Nmap done: 1 IP address (1 host up) scanned in 21.50 seconds
Any clue about why nmap doesn't detect the port 22333?
-sV
. You might also want to try the other scan types:-sS
-sV
connects and waits to get a response, just like your telnet connection. It slows down your scans, is very noisy on the target, but gives better results.-sV
should not make a difference, since it does not run unless-sS
or-sT
detect the port to be open. Maybe there is some instability in the service that makes it not available all the time?