Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"zmap: could not detect default gateway address for 0." on VPS with strange interfaces #35

Closed
sanderjo opened this issue Aug 20, 2013 · 22 comments

Comments

@sanderjo
Copy link

(git version of zmap, which BTW reports "zmap 1.0.0".)

Summary:
On a VPS, with a non-normal ifconfig, I get strange results from zmap which I cannot solve with -i nor -G

Long story:

On a VPS, I get:

root@superdoos:# zmap -p 80 -N 10 -B 1M -o -
Aug 20 18:22:20.820 [INFO] zmap: started
Aug 20 18:22:20.899 [FATAL] zmap: could not detect default gateway address for 0. Try setting default gateway mac address (-G).
root@superdoos:
#

My ifconfig shows:

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:5.2.2.1 P-t-P:5.2.2.3 Bcast:0.0.0.0 Mask:255.255.255.255

(public IPv4 address a bit altered)

Specifying "-i venet0:0" or "-i venet0:0" results in the same problem.

Additionally specifying -G results in another error message, a high ETA and no useful ports found:

zmap -p 80 -N 10 -B 1M -o - -i venet0 -G 00:00:00:00:00:00

Aug 20 18:27:12.031 [INFO] zmap: started
SIOCGIFADDR: Invalid argument
0:01 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:02 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:03 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:04 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:05 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:06 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%
0:07 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: -nan%

@jhalderm
Copy link

I don't think we can support venet, since it apparently doesn't work with libpcap:
https://openvz.org/Virtual_network_device

@sanderjo
Copy link
Author

FWIW: "tcpdump" does work correctly on this VPS; it says "listening on venet0" and then reports stuff on the line:

tcpdump

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
19:09:40.416074 IP6 2607:ff2xxxxx.ssh > 2a00:cd8:4dxxxx14: Flags [P.], seq 4089851818:4089852026, ack 3083302732, win 228, options [nop,nop,TS val 3279915382 ecr 3414342], length 208

@ewust
Copy link
Contributor

ewust commented Aug 31, 2013

Can you test with the latest master commit, using the new --vpn flag? Probably will need -i venet0 --vpn. I'm not sure if venet expects some other hardware header or IP packets, but if it expects IP packets, then --vpn should work.

@sanderjo
Copy link
Author

sanderjo commented Sep 1, 2013

I did a git pull, make clean, make (no make install). The --vpn parameter gives the result below. My interpretation: 1) no errors, but 2) no results at all

root@superdoos:/git/zmap/src# ./zmap --version
zmap 1.0.0
root@superdoos:
/git/zmap/src#
root@superdoos:/git/zmap/src# ./zmap -p 80 -N 10 -B 1M -o - -i venet0
Sep 01 12:30:37.909 [INFO] zmap: started
Sep 01 12:30:37.909 [FATAL] zmap: could not detect default gateway address for 0. Try setting default gateway mac address (-G).
root@superdoos:
/git/zmap/src#
root@superdoos:/git/zmap/src#
root@superdoos:
/git/zmap/src# ./zmap -p 80 -N 10 -B 1M -o - -i venet0 --vpn
Sep 01 12:30:42.566 [INFO] zmap: started
0:00 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
SIOCGIFADDR: Invalid argument
0:01 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:02 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:03 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:04 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:05 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:06 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:07 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:08 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:09 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:10 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:11 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:12 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:13 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:14 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:15 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%

root@superdoos:~/git/zmap/src# ./zmap -p 80 -N 10 -B 1M -o - -i venet0:0 --vpn
Sep 01 12:35:13.693 [INFO] zmap: started
0:00 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
SIOCGIFADDR: Invalid argument
0:01 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:02 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:03 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:04 0%; send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:05 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:06 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:07 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:08 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:09 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:10 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:11 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:12 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
0:13 0% (68 years left); send: 0 0 p/s (0 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%

FWIW: the old, installed zmap does not know the "--vpn", so that is a proof I'm using the new zmap.

root@superdoos:/git/zmap/src# zmap -p 80 -N 10 -B 1M -o - -i venet0 --vpn
zmap: unrecognized option '--vpn'
root@superdoos:
/git/zmap/src#

@andrewsmhay
Copy link

I also just tested this and had the same issue.

nmap works but you have to specify the following (perhaps it'll help):

nmap -e venet0:0 -Pn -S

The provider even gave me the upstream GW MAC and the issue persists.

I am happy to provide access to the server for testing, if required.

@andrewsmhay
Copy link

Same problem in masscan

@Esya
Copy link

Esya commented Jan 28, 2014

Does not work here, would love a solution (Inside an OpenVZ here, with venet as well)

@hexlax
Copy link

hexlax commented Jan 28, 2014

Has anyone been able to work around this bug in the interim? Is there a way to request a different interface type from the VPS provider perhaps?

@BarryReid
Copy link

I have the same problem with the venet interface. Any fix for this yet? or anyone find a work around?

@snapo
Copy link

snapo commented Feb 18, 2014

using openvz for this would be great....

@hexlax
Copy link

hexlax commented Feb 18, 2014

I switched VPS providers to one that uses KVM instead..

On Tuesday, February 18, 2014, snapo notifications@github.com wrote:

using openvz for this would be great....

Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-35371112
.

Please excuse brevity as this was sent from my mobile device.

@snapo
Copy link

snapo commented Feb 18, 2014

hexlax could you tell me the vps provider that allows zmap?

@hexlax
Copy link

hexlax commented Feb 18, 2014

I really like Digital Ocean. In the event you receive an abuse complaint
for your scans, be sure to add that range to your block list..

On Tuesday, February 18, 2014, snapo notifications@github.com wrote:

hexlax could you tell me the vps provider that allows zmap?

Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-35388788
.

Please excuse brevity as this was sent from my mobile device.

@BarryReid
Copy link

@hexlax have you never got a complaint from Digital Ocean for DDOS'ing or anything? What speed to you scan at?

@hexlax
Copy link

hexlax commented Feb 18, 2014

@barry - I have received abuse complaints, at which time I am proactive in
adding those to my blocklists. I also reached out to Digital Ocean prior to
scanning to inform them I am researcher and to let me know if there are any
problems related to my scans..

On Tue, Feb 18, 2014 at 5:45 PM, Barry Reid notifications@github.comwrote:

@hexlax https://github.com/hexlax have you never got a complaint from
Digital Ocean for DDOS'ing or anything? What speed to you scan at?

Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-35444740
.

@BarryReid
Copy link

@hexlax could you please drop me an email @ barryjreid@gmail.com would like to grab some info from you and maybe get hold of that blocklist you use, that way I start off on a good note :)

@barry
Copy link

barry commented Feb 20, 2014

I don't know why I am being CC'ed; I have no connection to zmap. Do you
have the correct "Barry"?

On 18 February 2014 22:52, hexlax notifications@github.com wrote:

@barry - I have received abuse complaints, at which time I am proactive in
adding those to my blocklists. I also reached out to Digital Ocean prior to
scanning to inform them I am researcher and to let me know if there are any
problems related to my scans..

On Tue, Feb 18, 2014 at 5:45 PM, Barry Reid <notifications@github.com

wrote:

@hexlax https://github.com/hexlax have you never got a complaint from
Digital Ocean for DDOS'ing or anything? What speed to you scan at?

Reply to this email directly or view it on GitHub<
https://github.com/zmap/zmap/issues/35#issuecomment-35444740>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-35445392
.

@abbypan
Copy link

abbypan commented Jun 12, 2014

zmap 1.2.1 on openvz vps , add --vpn is still fail.

@zakird
Copy link
Member

zakird commented Jun 12, 2014

Does it allow sending an IP packet? Given that none of us use this, we're good to need more information from you to work on this at all. Can you provide tcpdump or similar?

@zakird zakird closed this as completed Jun 12, 2014
@LaserGunJesus
Copy link

Yeah I cannot scan either. Same issue. Can Nmap achieve the same things as zmap?

@brammittendorff
Copy link

Same issue here, masscan to. I juse evilscan now: https://github.com/eviltik/evilscan

@roeea2
Copy link

roeea2 commented Mar 13, 2019

So even though this issue as closed and I remember @zakird said in another post that this issue will not be fixed.
I found a way to baypass it and my solution is to install a docker on the VPS which is using a none kvm method.

It worked from within the docker (don;t use --vpn)

@zakird zakird removed this from the ZMap Wish List milestone Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests