1

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

3 Answers3

6

Yes:

nmap -p 23 127.0.0.0/24

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

http://en.wikipedia.org/wiki/CIDR_notation

polynomial
  • 4,016
  • 14
  • 24
  • 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. – Phil Hollenback Aug 29 '11 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 '11 at 15:09
1

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

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.

warren
  • 18,369
  • 23
  • 84
  • 135
0

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

nmap -p 23 188.34.95.0/24

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 '11 at 15:13
  • but why i get Nmap finished: 256 IP addresses (0 hosts up) ? is this for nmap version ? – Jessica Aug 29 '11 at 17:12
  • maybe on 4.11 this scan needs to be run as root? – petrus Aug 29 '11 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 '11 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 188.34.95.184" 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 '11 at 18:18
  • i found the problem : we can not check :nmap -p 23 188.34.95.0/24 for our isp , its not work for me because iam belong to a ip from 188.34.95.0/24 ; and i test this command from a remote desktop and its work well ... Thanks – Jessica Aug 29 '11 at 19:16