Nmap Development mailing list archives

Re: nmap errors on *BSDs (noted on NetBSD and MacOSX, so far)


From: Fredrik Pettai <pettai () nordu net>
Date: Tue, 23 Mar 2010 20:44:13 +0100

On Mar 23, 2010, at 7:01 PM, David Fifield wrote:
On Tue, Mar 23, 2010 at 06:55:30PM +0100, Fredrik Pettai wrote:
On Mar 23, 2010, at 5:57 PM, David Fifield wrote:
On Tue, Mar 23, 2010 at 05:28:29PM +0100, Fredrik Pettai wrote:
I've noted two problems that has surfaced in between the release of
nmap
5.00 (2009-07-15) -> 5.10BETA1 (2009-11-23).


The other, more problematic error (not present on Mac OS X AFAIK), is
then you run nmap as root on NetBSD, you get this error:

# ./nmap -A ping.sunet.se

Starting Nmap 5.10BETA1 ( http://nmap.org ) at 2010-03-23 16:35 CET
WARNING: Unable to find appropriate interface for system route to
193.10.5.1
WARNING: Unable to find appropriate interface for system route to
127.0.0.1
WARNING: Unable to find appropriate interface for system route to
127.0.0.1
Target* nexthost(HostGroupState*, TargetGroup*, scan_lists*, int):
failed to determine route to ping.sunet.se (192.36.125.18)
QUITTING!

However, running as a normal user, it works as expected.

This is probably not an error related to NetBSD, but to the routing
table on this particular host. Please send in the output of
"nmap --iflist". Some bugs related to routing were fixed recently and
aren't yet in an official release, and this might be affecting you.

I compiled nmap from pkgsrc on the same Mac, and then I get the same
errors as on NetBSD.
(Could it be due to that pkgsrc relies on libpcap and pcre from the
pkgsrc tree.)

nmap-5.21 ->
libpcap-1.0.0nb2 System-independent interface for user-level packet
capture
pcre-8.00           Perl Compatible Regular Expressions library

I also compiled the SVN version (in pkgsrc on NetBSD), and it fails the
same way as before:

bash-4.0# ./work/nmap-5.22/nmap --iflist

Starting Nmap 5.21 ( http://nmap.org ) at 2010-03-23 18:52 CET
INTERFACES: NONE FOUND(!)
WARNING: Unable to find appropriate interface for system route to
193.10.5.1
WARNING: Unable to find appropriate interface for system route to
127.0.0.1
WARNING: Unable to find appropriate interface for system route to
127.0.0.1
ROUTES: NONE FOUND(!)

"INTERFACES: NONE FOUND(!)" is definitely the error here. That's not
expected. Give me some time to think more about what might be causing
it. The first thing I can think of offhand is to check the permissions
on the /dev/bpf devices.

$ ls -l /dev/bpf*

crw-------  1 root  wheel  23, 0 Jan 17 22:39 /dev/bpf
lrwx------  1 root  wheel      3 Jan 17 22:39 /dev/bpf0 -> bpf

Also send the output of "netstat -rn". That will be the routing table as it's supposed to be. You only need to send the "Internet" part, not the
"Internet6" part.

$ netstat -rn -f inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface default 192.168.1.1 UGS 1 63356 - pcn0
127/8              127.0.0.1          UGRS        0        0  33192  lo0
127.0.0.1          127.0.0.1          UH          2        0  33192  lo0
192.168.1/24 link#1 UC 2 0 - pcn0 192.168.1.1 00:19:5b:42:a5:e8 UHLc 2 2839266 - pcn0 192.168.1.112 00:1f:5b:35:2d:ac UHLc 1 76056 - pcn0
192.168.1.113      127.0.0.1          UGHS        0        0  33192  lo0

Re,
/P
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: