1

We have multiple sites with multiple subnets. We have mandated that the admins at those sites enter DNS names for all devices that exist on the network. (anything with an IP gets a name) I want to be able to audit this and make sure this has been done.

I am able to run an individual network scan on each subnet but that takes time. I would like a way to kick off a scan that runs through all subnets once a week and gives me an output file with a list of names and IPs. (preferably csv) I have tried to do this nmap but getting a nice list of IPs and their corresponding names is not easy.

  • nmap produces nice output of the type you are looking for. Why does your scan take time? – schroeder Oct 27 '15 at 21:07
  • Also - what is your question? Note that product recommendations are off-topic (and nmap can do what you want it to) – schroeder Oct 27 '15 at 21:08
  • 1
    May want to post what you nmap command is that you're currently using. There shouldn't be a reason you can't script this. – KDEx Oct 28 '15 at 4:45
1

The nmap tool combined with some scripting would definitely be able to do this.

Read the nmap book Chapter 13. You might find the "grepable output" is of use: https://nmap.org/book/output-formats-grepable-output.html

This chapter even gives ideas for cutting the file into different fields.

Scanning multiple subnets is straightforward. You can feed nmap an "input list file" or you can specify multiple targets on the command line: enter link description here

As another poster noted; it'd be helpful to see what you've tried already.

|improve this answer|||||
1

You can use multiple CIDR ranges in your scans

nmap -10.0.2.0/24 128.0.0.0/16.

Here is perl module that seems to do what you want: https://metacpan.org/pod/release/APERSAUD/Nmap-Parser-0.80/tools/nmap2csv.pl

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.