Is there a reason for the max-host specification limit

Hi,

I have a large network to scan, and I want to automate this scan.
Now, I see there is a hard coded? limit to the maximum numbers of hosts in one target.

/**
 * @brief Default maximum number of hosts a target may specify.
 */
#define MANAGE_MAX_HOSTS 4095

In https://github.com/greenbone/gvmd/blob/master/src/manage.h

Is there a reason that this specific limit is here (performance or so)? Or can I change it?

As stated in this issue on github, this is because:

users might overload their scanner too easily if scanning such huge ranges within a single task.

There it is also stated that:

Max hosts is configurable with gvmd’s --max-ips-per-target , by the way.

2 Likes

Thanks for that.
I’ve configured the max hosts, but still won’t let me add a big range.

Please note that --max-ips-per-target is a start up parameter for gvmd which means that you need to pass it to gvmd when launching the daemon (e.g. in your startup script).

If gvmd is already running calling gvmd --max-ips-per-target on command line won’t do anything.

2 Likes

Oops. Made a typo in it.
Chaned the gvm.service file and it worked.

Thanks for the help

1 Like