Problem running Nmap

View: New views
6 Messages — Rating Filter:   Alert me  

Problem running Nmap

by Neminath :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I m new to Nmap and to linux rather
have the following problem running Nmap scanner


nmap -O x.x.x.x
when i run the above command i get the following (infact for all the commands)

Starting Nmap 4.20 ( http://insecure.org ) at 2008-07-06 11:46 IST
mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns_servers
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 0.171 seconds

whats this message is all about how do i resolve it .

Regards
Neminath


Re: Problem running Nmap

by Ron (list) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Neminath,

Are you specifying the host with a numeric ip address (eg, 12.34.56.78)
or a name (server.mydomain.x)? I'm assuming the first, baesd on your
question.

The first problem seems to be that the system you're running it from
doesn't have the normal DNS file, /etc/resolv.conf. You can create a
default one with the following command:

  echo "nameserver 4.2.2.1" >> /etc/resolv.conf

That'll set you up with a solid default nameserver. The alternative is
to specify it on nmap's commandline:

  nmap --dns-servers 4.2.2.1 x.x.x.x

That'll do it without touching the system's configuration.

The other issue seems to be that the server you're scanning isn't
returning pings, or is offline entirely. If it isn't returning pings and
you know it's operational, try:

  nmap -PN x.x.x.x
or
  nmap -P0 x.x.x.x
(that's a zero after the 'P')

If that still returns no results, then the target isn't up or you're
being blocked by something else.

Two more notes:
a) You may need to run these with root privileges, try doing a "su"
first, or putting a "sudo" in front of the commands.
b) You're running an old version of nmap, you may want to update.

Hope that helps!

Ron

Neminath wrote:

> I m new to Nmap and to linux rather
> have the following problem running Nmap scanner
>
>
> nmap -O x.x.x.x
> when i run the above command i get the following (infact for all the
> commands)
>
> Starting Nmap 4.20 ( http://insecure.org ) at 2008-07-06 11:46 IST
> mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns
> or specify valid servers with --dns-servers
> mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is
> disabled. Try using --system-dns or specify valid servers with --dns_servers
> Note: Host seems down. If it is really up, but blocking our ping probes, try
> -P0
> Nmap finished: 1 IP address (0 hosts up) scanned in 0.171 seconds
>
> whats this message is all about how do i resolve it .
>
> Regards
> Neminath
>
>


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Re: Problem running Nmap

by Neminath :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Ron,

Yes i checked my ubuntu box /etc folder there is no resolv.conf file in it. But the file is located at /usr/share/ubuntu-docs/ubuntu/sample/  folder.  I tried coping  the file to /etc folder but its not allowing to do so saying permission denied even in case i use sudo .
I tried creating another one with command given by u thats also resulted same.

The second option of providing dns server names with command seems working only if the machine is on the same hub.

Re: Problem running Nmap

by Neminath :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Ron,

Yes i checked my ubuntu box /etc folder there is no resolv.conf file in it.
But the file is located at /usr/share/ubuntu-docs/ubuntu/sample/  folder.  I
tried coping  the file to /etc folder but its not allowing to do so saying
permission denied even in case i use sudo .
I tried creating another one with command given by u thats also resulted
same.

The second option of providing dns server names with command seems working
only if the machine is on the same hub.

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Re: Problem running Nmap

by William Njuguna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Neminath wrote:

> Thanks Ron,
>
> Yes i checked my ubuntu box /etc folder there is no resolv.conf file in it.
> But the file is located at /usr/share/ubuntu-docs/ubuntu/sample/  folder.  I
> tried coping  the file to /etc folder but its not allowing to do so saying
> permission denied even in case i use sudo .
> I tried creating another one with command given by u thats also resulted
> same.
>
> The second option of providing dns server names with command seems working
> only if the machine is on the same hub.
>
> _______________________________________________
> Sent through the nmap-dev mailing list
> http://cgi.insecure.org/mailman/listinfo/nmap-dev
> Archived at http://SecLists.Org
>
>  
Hi its also possible to turn off dns lookups with -n option

e.g.
nmap -n x.x.x.x

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Re: Problem running Nmap

by Ron (list) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Root should definitely have permission to move that file, maybe there
are restrictions on Ubuntu? I'm not familiar with it, maybe somebody
else could shed some light.

If you're having trouble scanning outside your network, it may be due to
something blocking you. Try doing a TCP Connect scan (-sT) on
scanme.insecure.org (64.13.134.52) on a limited number of ports:

nmap -sT -p1-50 -PN 64.13.134.52

If that doesn't work, then there's something stranger going on. Paste
the full output here and give this a try:

nmap -sT -p22 -PN --packet-trace 64.13.134.52

That should print a whole lot of stuff, just paste it into an email.

Also, maybe this is a dumb question, but are you able to actually get to
the Internet normally? Like, can you go to http://www.google.ca ?

Ron

Neminath wrote:

> Thanks Ron,
>
> Yes i checked my ubuntu box /etc folder there is no resolv.conf file in it.
> But the file is located at /usr/share/ubuntu-docs/ubuntu/sample/  folder.  I
> tried coping  the file to /etc folder but its not allowing to do so saying
> permission denied even in case i use sudo .
> I tried creating another one with command given by u thats also resulted
> same.
>
> The second option of providing dns server names with command seems working
> only if the machine is on the same hub.
>
> _______________________________________________
> Sent through the nmap-dev mailing list
> http://cgi.insecure.org/mailman/listinfo/nmap-dev
> Archived at http://SecLists.Org

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org