I want to port scanning on telnet port in a range ip . for ex: i want to know is the 23 port open on ? what am i going to do ? is there a option for Nmap to do this ? Thanks .

  • Why not just do telnet 23?
    – undur_gongor
    Aug 29, 2011 at 13:56
  • no , i want test is the telnet port open for this range ?
    – Jessica
    Aug 29, 2011 at 14:00

3 Answers 3



nmap -p 23

Will scan port 23 on The /24 is CIDR notation, more info on that here:


  • 3
    If the hosts are blocking ping, the default nmap behavior is to assume they are down. Add the -P0 flag to your nmap invocation to make nmap assume the hosts are up. Aug 29, 2011 at 14:36
  • @Phil: -P0 is deprecated : This option flag used to be P0, but was renamed to PN avoid confusion with protocol ping´s PO (man nmap)
    – petrus
    Aug 29, 2011 at 15:09

If you're scanning the range of - you're only looking on your localhost (and unless you're doing something sorta funky, the only hit you should get is on

Are you sure that's the range you want to scan?

It would be faster to run netstat -an > openports.txt from a command prompt, then see if 23 is listening.


sorry i cant send a comment but i test the option : nmap -p 23 and the result is : its looklike dont work well ...

nmap -p 23

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-08-29 07:10 PDT Nmap finished: 256 IP addresses (0 hosts up) scanned in 20.399 seconds

  • in the very same subnet, I found a lot of hosts up : Nmap done: 256 IP addresses (17 hosts up) scanned in 12.06 seconds
    – petrus
    Aug 29, 2011 at 15:13
  • but why i get Nmap finished: 256 IP addresses (0 hosts up) ? is this for nmap version ?
    – Jessica
    Aug 29, 2011 at 17:12
  • maybe on 4.11 this scan needs to be run as root?
    – petrus
    Aug 29, 2011 at 17:24
  • iam in ssh and my access is root , and in windows i test it and get the same result (in windows nmap version is 5.51) ; iam getting confused !!! what is your nmap version ?
    – Jessica
    Aug 29, 2011 at 17:29
  • I wonder if there's a firewall blocking outgoing telnet between you and your target network? You can try "traceroute -T -p 23" or something like that to see if there's a block someplace. Note that, even though I just tried the same nmap and got 24 hosts reporting with an open telnet, I can't telnet to a sample of those machines.
    – cjc
    Aug 29, 2011 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy