Nmap Development mailing list archives

Re: Nmap under OpenVZ venet?


From: NStorm <nstorm0.0 () privatdemail net>
Date: Tue, 12 Mar 2013 08:55:30 +0400

On Thursday 07 March 2013 14:54:06 David Fifield wrote:
On Wed, Mar 06, 2013 at 09:11:55AM +0400, NStorm wrote:
Long version:

I've read a bits regarding the issues with venet devices on list archives
(http://seclists.org/nmap-dev/2012/q2/808).
Seems like there is no solution yet. I've tried this myself and got
interesting results. Seems like if I run it from normal user it works
fine: $ nmap -A -v host.domain

Starting Nmap 6.25 ( http://nmap.org ) at 2013-03-06 07:28 MSK
NSE: Loaded 106 scripts for scanning.
NSE: Script Pre-scanning.
Initiating Ping Scan at 07:28
Scanning host.domain (X.X.X.X) [2 ports]
Completed Ping Scan at 07:28, 1.36s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 07:28
Completed Parallel DNS resolution of 1 host. at 07:28, 0.05s elapsed
Initiating Connect Scan at 07:28
Scanning host.domain (X.X.X.X) [1000 ports]
Discovered open port 53/tcp on ...

And scan completes as normal.
But if I try to run the same thing, from same host just under root
priveledges (either from sudo or directly from shell) it seems to go
weird:

Initiating ARP Ping Scan at 07:27
Scanning host.domain (X.X.X.X) [1 port]
Completed ARP Ping Scan at 07:27, 0.42s elapsed (1 total hosts)
Nmap scan report for host.domain (X.X.X.X) [host down]

Can you send me your
      nmap --route-dst X.X.X.X
      nmap --iflist
(As root.)

David Fifield
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
Its really not related to the setup I guess, because I've tested that on 4 
different hosts. Be it rented VPS from a provider with real Internet IP on 
venet0 or my own container behind a private network. Here is the list from my 
private container:
# nmap --iflist

Starting Nmap 6.25 ( http://nmap.org ) at 2013-03-12 08:50 MSK
************************INTERFACES************************
DEV    (SHORT)  IP/MASK         TYPE     UP MTU   MAC
lo     (lo)     127.0.0.1/8     loopback up 16436
lo     (lo)     ::1/128         loopback up 16436
venet0 (venet0) 127.0.0.1/32    ethernet up 1500  00:00:00:00:00:00
venet0 (venet0) 192.168.9.50/32 ethernet up 1500  00:00:00:00:00:00

**************************ROUTES**************************
DST/MASK       DEV    GATEWAY
169.254.0.0/16 venet0
0.0.0.0/0      venet0
::1/128        lo

# nmap --route-dst 8.8.8.8

Starting Nmap 6.25 ( http://nmap.org ) at 2013-03-12 08:50 MSK
8.8.8.8
venet0 venet0 srcaddr 192.168.9.50 direct
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.03 seconds

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=83.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=49 time=83.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=49 time=83.4 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2135ms
rtt min/avg/max/mdev = 83.425/83.618/83.919/0.397 ms

# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  my-host-node (192.168.9.233)  0.028 ms  0.011 ms  0.009 ms
 2  my-internet-gw (X.X.X.X)  1.704 ms  1.708 ms  1.700 ms
...
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: