I have a list of systems for which I'm trying to get IP addresses. I've successfully used the Net::DNS module for perl to perform an IP address query for a single hostname. I have 1,000 systems, however, that I need ip addresses for.
Is there a way to get all of these ip addresses with a single query?
If not, is there a way to get the entire DNS entry list, say, for a single domain? If I got that, then I could simply put that into a hash and reference the IP addresses that way.
No need for custom Perl. This can be done using the -f
option to dig
(part of the BIND tools):
$ dig -f /path/to/host-list.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With