While creating a “Target” for scanning - I am using the subnet “10.102.0.0/24” but I keep getting an error stating that there is an error in host specification. This is the LAN we are using! Why is it not taking it? I noticed that when the third octet is anything but a zero, it works. Please help.
Had this same problem from Kali Linux. After upgrading Kali to 2019.1 we have problem with OpenVAS. Existing targets with a subnet definition (e.g. 10.0.0.0/24) is considered invalid. Creating new targets fails, both from CLI and through GSA webinterface.
Main problem is that existing targets are no longer valid. In GSA the number op IPs is -1 for these targets. OpenVAS itself wasn’t updated.
The problem depends on the position of ‘/’. If ‘/’ is the 12th or higher character there is no problem.
So:
10.0.1.1/24 – Fails
10.10.1.1/24 – Fails
10.10.10.1/24 – Fails
10.10.10.1/24 – Fails
10.10.10.10/24 – no problem. ‘/’ is 12th character
10.10.1.10/24 – Fails
10.10.1.100/24 – no problem
192.168.1.1-254 – no problem
I’ve found a workaround for old targets that have problems after the upgrade:
Generate a list of all IP-adressses in the subnet for example with ‘nmap -sL 10.1.1.0/24’
Stop openvas-manager
Open SQLite3 databse: sqlite3 /var/lib/openvas/mgr/tasks.db
Update table targets. E.g. update targets set hosts = ’ where name = ‘’
/**
* @brief Default maximum number of hosts a target may specify.
*/
#define MANAGE_MAX_HOSTS 4095
/**
* @brief Default maximum number of hosts a user host access may specify.
*/
#define MANAGE_USER_MAX_HOSTS 16777216
If you’re on the latest GVM-20.08 release (other GVM releases probably won’t receive much fixes anymore as they are either already EOL or will reach EOL by the end of this year) and there is something to fix the following advice is still valid because it is not guaranteed that some one of the development team is noticing that there needs to be something to fix.
Also note that AFAIK the “Error in host specification” might also happens if you’re specifying a too large netmask when creating a new target. Currently the max netmask per target is /20.