Nmap Development mailing list archives

Re: WARNING: Unable to find appropriate interface for system route to ...


From: clozapina <clozapina () gmail com>
Date: Fri, 21 Apr 2006 23:25:43 +0200

Rather ;-)
nmap-4.02Alpha2 root# ./nmap -p80,81 -P0 -e ppp0 217.201.xxx.xx -- 
send-ip -O

Starting Nmap 4.02Alpha2 ( http://www.insecure.org/nmap/ ) at  
2006-04-21 23:14 CEST
WARNING: Unable to find appropriate interface for system route to  
217.200.178.19

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx

WARNING: Unable to find appropriate interface for system route to  
217.200.xxx.xx


Interesting ports on 217.201.xxx.xx:
PORT   STATE  SERVICE
80/tcp open   http
81/tcp closed hosts2-ns
No exact OS matches for host (If you know what OS is running on it,  
see http://www.insecure.org/cgi-bin/nmap-submit.cgi).
TCP/IP fingerprint:
SInfo(V=4.02Alpha2%P=powerpc-apple-darwin8.6.0%D=4/21%Tm=44494B80% 
O=80%C=81)
TSeq(Class=RI%gcd=1%SI=58591E%IPID=I%TS=U)
TSeq(Class=RI%gcd=1%SI=36C00A%IPID=I%TS=U)
TSeq(Class=RI%gcd=1%SI=774F71%IPID=I%TS=U)
T1(Resp=Y%DF=N%W=16D0%ACK=S++%Flags=AS%Ops=ME)
T1(Resp=Y%DF=N%W=16D0%ACK=O%Flags=A%Ops=)
T2(Resp=Y%DF=N%W=0%ACK=S%Flags=AR%Ops=)
T3(Resp=Y%DF=N%W=16D0%ACK=S++%Flags=AS%Ops=ME)
T3(Resp=Y%DF=N%W=16D0%ACK=O%Flags=A%Ops=)
T4(Resp=Y%DF=N%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=Y%DF=N%W=0%ACK=S++%Flags=AR%Ops=)
T6(Resp=Y%DF=N%W=0%ACK=O%Flags=R%Ops=)
T7(Resp=Y%DF=N%W=0%ACK=S++%Flags=AR%Ops=)
PU(Resp=Y%DF=N%TOS=0%IPLEN=38%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134% 
DAT=E)



Nmap finished: 1 IP address (1 host up) scanned in 100.642 seconds

bye

On 21 Apr 2006, at 06:28, kx wrote:

And just to round out the testing, could you please give me the output
for something like:

./nmap -p80,81 -P0 -e ppp* 192.168.1.1 --send-ip -O

By specifying -e, nmap will set the interface for the rnfo, but
doesn't set nexthop, which I don't think it needs for raw sockets.
Despite this, Damian's output showed that a sendto() call errors with
"No route to host", which is bizarre, because that is a system, not
nmap error?

Cheers,
  kx

On 4/19/06, clozapina <clozapina () gmail com> wrote:
Hi,
this is the output with -e

./nmap -p 25 -P0 -e ppp0 www.xxxx.it

Starting Nmap 4.02Alpha2 ( http://www.insecure.org/nmap/ ) at
2006-04-19 13:34 CEST
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20

Interesting ports on www.xxxx.it (62.xxx.xxx.xxx):
PORT   STATE SERVICE
25/tcp open  smtp

Nmap finished: 1 IP address (1 host up) scanned in 1.418 seconds

and without -e

./nmap -p 25 -P0  www.xxxx.it

Starting Nmap 4.02Alpha2 ( http://www.insecure.org/nmap/ ) at
2006-04-19 13:37 CEST
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20
WARNING: Unable to find appropriate interface for system route to
217.200.178.20

nexthost: failed to determine route to 62.xxx.xxx.xxx
QUITTING!

bye


On 19 Apr 2006, at 02:31, kx wrote:

Thanks clozapina! You are a fricking hero.  I however, am an nmap
n00b. 3.84 was the first version to include dnet and the whole  
rework
of that infrastructure. I should have known better.

Looking back at 3.81, it appears as though the routethrough function
in tcpip.cc was responsible for some of the same work that route_dst
does now. Not sure if we need to add some logic back in from  
that, but
let me ramble some more.

A question I have, could someone send me the output when they  
specify
the -e output? I could use that error message if any.

Again, I don't have a *BSD box, but here is my take at what is
going on:

Getting the routes from Linux-style /proc/net/route isn't  
working. So
nmap tries to get the routes with dnet via, collect_dnet_routes(),
which is the call that produces the error("WARNING: Unable to find
appropriate interface for system route to %s\n",
addr_ntoa(&entry->route_gw)); I was focusing on the "nexthost" error
in earlier emails, which is a result of this.

The good news, is that nmap knows what gateway to use, but it can't
determine the interface to fill in the route table.

This the code in collect_dnet_routes that is failing, probably  
due to
failure to match the mask bits and then nmap thinks we aren't on the
same subnet? I am not familiar with ppp, pppoe, or tun  
interfaces. Is
the default mask not /0? If anyone could take a look at the  
values in
this loop, it would help for sure.

  /* Now determine which interface the route relates to */
  u32 mask;
  struct sockaddr_in *sin;
  for(i = 0; i < dcrn->numifaces; i++) {
    sin = (struct sockaddr_in *) &dcrn->ifaces[i].addr;
    mask = htonl((unsigned long) (0-1) << (32 - dcrn->ifaces
[i].netmask_bits));
    if ((sin->sin_addr.s_addr & mask) == (entry->route_gw.addr_ip &
mask)) {
      dcrn->routes[dcrn->numroutes].device = &dcrn->ifaces[i];
      break;
    }
  }

Last if not least, it is a hack, but we could consider adding a
--next_hop option to force a next hop, and it would complete the -e
and -S options we have now.

Cheers,
  kx



On 4/18/06, clozapina <clozapina () gmail com> wrote:
Ciao hx,

here your request, starting from the end ;-):


3.81 configure and make: work
3.84alfa1 configure and make: don't work
3.84alfa2 configure and make: don't work
3.90  configure and make: don't work
4.01 configure and make: don't work
4.02alfa2  configure and make: don't work

ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu
1500
        ether 00:0a:95:xx:xx:xx
        media: autoselect (none) status: inactive
        supported media: none autoselect 10baseT/UTP <half-duplex>
10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback>
100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-
duplex,hw-loopback>
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu
1500
        ether 00:0d:93:xx:xx:xx
        media: autoselect (<unknown type>) status: inactive
        supported media: autoselect
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu
2030
        lladdr 00:0a:95:xx:xx:xx:xx:xx
        media: autoselect <full-duplex> status: inactive
        supported media: autoselect <full-duplex>
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 217.201.16.30 --> 217.200.178.19 netmask 0xffffff00

./nmap --iflist

Starting Nmap 4.01 ( http://www.insecure.org/nmap/ ) at 2006-04-18
18:38 CEST
************************INTERFACES************************
DEV  (SHORT) IP/MASK          TYPE        UP MAC
lo0  (lo0)   127.0.0.1/8      loopback    up
ppp0 (ppp0)  217.201.28.62/24 point2point up

WARNING: Unable to find appropriate interface for system route to
217.200.178.19

WARNING: Unable to find appropriate interface for system route to
217.200.178.19

WARNING: Unable to find appropriate interface for system route to
217.200.178.19

**************************ROUTES**************************
DST/MASK          DEV  GATEWAY
127.0.0.1/32      lo0  127.0.0.1
217.200.178.19/32 ppp0 217.201.28.62
127.0.0.0/8       lo0  127.0.0.1

ask me for more info.
thks
bye


On 18/apr/06, at 14:13, kx wrote:

Bottom line, something in nmap or dnet is having difficulty  
getting
system routes, and it appears to be most common on *BSD kernels on
non-ethernet adapters.

Gianluigi, can you please send the output of "nmap --iflist" from
nmap 4.01?

Can you also please send the output of your "ifconfig -a" on OS X?

And last but not least, would you be willing to try working  
your way
up from nmap 3.81 to 4.01 and let us know what is the first
version of
nmap that breaks?  I know that is asking a lot, but it would be  
the
most valuable. Old distributions can be found here:
http://www.insecure.org/nmap/dist/

Thanks again,
  kx

On 4/17/06, gianluigi angotti <clozapina () gmail com> wrote:
Hi,
this is only a note; i know that this problem is known.
I try to use nmap on a ppp via gprs connection and the result is
WARNING: Unable to find appropriate interface for system route
to ...
At this moment i don't have experience on a different connection.
I compile nmap 4.01 on Mac OSX 10.4.6.
libdnet is 1.10
I use without problem 3.81.
bye




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








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


Current thread: