Nslookup Guru's Needed!

Associate
Joined
6 May 2011
Posts
470
Hey guys, I posted this in the windows section, however I think it may be suited more to the networky guys :D

I need some help with an nslookup command. It will be ran as a single line (hopefully)

I need the equivalent of this, but as a single command:

nslookup
> server 127.0.0.1
> ls -d test.com.

The reason it needs to be a single line is, the program that runs it will only run 1 command, wait on the result being returned, then quit - so I cant run it as above ^

And ideas how I can do this? So far I have: nslookup test.com. 127.0.0.1 - I just don't know where to put the "ls -d" bit!

Thanks in advance!
 

J.B

J.B

Soldato
Joined
16 Aug 2006
Posts
5,922
I know -d list all records, what does ls do?

You can do nslookup -d [domain] normally and it will dump out all records.
 
Associate
Joined
6 May 2011
Posts
470
hmm, can't get -d working - It just shows all the server details, but not all the records.

I'm using the ls command basically to simulate a zone transfer - So if it returns with results, I know zone transfers are allowed, and if it doesn't, then I know it's not set up right!
 
Soldato
Joined
6 Sep 2008
Posts
3,975
Location
By the sea, West Sussex
Is it the full install or core? If it's core, the open the command prompt and type

dnscmd /enumzones

This will list the zones active on that server, check that your zone if there and it's named correctly.

Then list of the items in it with

dnscmd /zoneprint ZONENAME

and it should dump out of the records in that zone.



If its a full install, open the DNS tool, expand the Forward Lookup zones, find your zone and expand it, and look at the records on the left side.

If you want to actually try a zone transfer but dont have another server, trust me the domain name and the name server name and I'll setup a secondary zone on mine and let you know the details and you can try and zone transfer to it.
 
Top