I have a round-robin dns record I want to test with nmap, currently it only tries one of the IPs (if I run a loop it checks each in order).
Is there a way to have nmap test all A/AAAA records from a dns record?
example: nmap -p25 rr-test.jacobdevans.com
I think it's impossible without loop. Try to use
nping
insteadnmap
. Example for IPv4:For IPv6 use command:
Nmap can accomplish something like this with the
resolveall
NSE script. It needs thenewtargets
script argument to be set in order to actually add the other addresses to the scan queue instead of only listing them. So your solution would be:This will work for a name that has multiple A (or AAAA, with the
-6
option) records, all of which are returned in response to a single query. Round-robin DNS can be implemented by returning a single A record from a pool in response to each query; theresolveall
script will not be able to detect this, since it only sends one query.EDIT: I forgot that this is a new feature in Nmap 7.40, so earlier versions won't work the same way. For those versions (back to version 5.50) you need to use this syntax: