Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 .

share|improve this question

migrated from stackoverflow.com Aug 29 '11 at 14:01

This question came from our site for professional and enthusiast programmers.

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

3 Answers 3

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

share|improve this answer
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

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.

share|improve this answer

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

share|improve this answer
    
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

Your Answer

 
discard

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