T’Krin’s Realm

My yammerings…

Wednesday, February 2, 2005

Gather Windows/Samba Domain Member IP addresses

I maintain four different windows/samba domains at a university and two different hospitals. The domain member machines are spread across multiple subnets at all three locations and have dynamic addressing. I wanted to periodically scan my machines for open ports to see if anything funny was happening. To do this I needed the IPs of the systems that were connected at any given time. Using smbclient and nmblookup together could give me this information. findsmb would not work because it is limited to your current subnet. Therfore, I wrote a script to gather the IPs of domain members, so that I can scan them w/ nmap or just list them. I must thank rcsu in #samba at Freenode for his help to tweak the code. Thanks rcsu!

smbiplookup.pl

posted by tkrin at 11:26 pm  

Powered by WordPress