DNS lookup working but no hostname in report

Hello, this is my Setup:
Ubuntu Server 22.04.3
OpenVas 22.7.9
gvm-libs 22.7.3
Notus Scanner 22.6.2
gvmd 23.1.0
gsad 22.08.0

Installed everything from scratch.

On some hosts I do not get a hostname in the reports. When I run nslookup on the IP I get the hostname. What might be the reason for this?

When you use nslookup with an IP address, it queries the DNS server for a PTR (Pointer) record which is a reverse DNS lookup. This is different than a forward DNS lookup using A or AAAA records. However, the hostname returned by a nslookup should be available in the scan report. Maybe something was blocking UDP port 53 or your configured DNS server was unreachable? :thinking:

However, in GVM gathering a hostname is not as simple as using nslookup. There are many different contexts which hostnames can be gathered such as in the metadata of X.509 certificates.

It looks like openvas-scanner/nasl uses a built-in C library netdb.h and its function gethostbyaddr() for resolving IP addresses to hostnames. But don’t quote me on that.

1 Like

Thanks for your reply.
The DNS is reachable all the time. But as you said, GVM seems to use another way of gathering the hostname. The question is, if there is any kind of solution.
I will take a look at that library and how it works.

Maybe someone from the staff can help out with a hint?