You Are Here : Forums Tuesday, January 06, 2009
     
Activeworx.org Forums
 
  Forum  IDS Policy Mana...  IDS Policy Mana...  Access sensor name/IP as parameter to restartscript
Previous Previous
 
Next Next
New Post 1/8/2007 4:08 PM
  lindhor
2 posts
No Ranking


Access sensor name/IP as parameter to restartscript 

Hi,

It would be nice to be able to retrieve the name of the sensor when doing a filecopy upload and within a restartscript. I.e. use a $H on the commandline that is substituted with the name or IP of the sensor that is going to be/was updated. This would be useful if running on a Windows machine doing a upload using file copy, i.e. the destination dir would be \\$H\snort\etc. Restarting the sensor remotely typically needs the hostname of the remote host, i.e. C:/Program Files/ActiveWorx/IDS Policy Manager/Restart-snort.cmd $H.

That way SSH would not be required, and Windows standard authentication could be used, restart could then be handled via WMI or something similar.

Regards

// Roger

 

 
New Post 1/9/2007 1:10 PM
  Jeff Dell
251 posts
www.activeworx.com
1st Level Poster


Re: Access sensor name/IP as parameter to restartscript 
Modified By Jeff Dell  on 1/9/2007 8:12:06 AM)
hmm.. the sensor name/ip is part of the sensor configuration so you won't need to pull that information when uploading, it is already known. One thing you can't currently do is pass arguments to the script when you run it. I have added that support in the build which will be out in the next day or so. Now you will be able to add the ip address in the argument field and it will run the script with the ip similiar like this:

C:/Program Files/Activeworx/IDS Policy Manager/Restart-snort.cmd 192.168.0.10

This will pass the ip 192.168.0.10 into the script to use as you wish...


I also added replaceable variables for the following:

<ip> - IP Address of Sensor
<user> - User to connect to Sensor
<pass> - Pass to connect to Sensor

So you can do something like:

Arguments to pass into the script are: <ip> <user> <pass>

So the command will look like the following:

C:/Program Files/Activeworx/IDS Policy Manager/Restart-snort.cmd <ip> <user> <pass>

This will pass in the ip address, username and the password to the script. this way you don't have to have the user and pass in a clear text script.

Does this work for you?

Cheers,

Jeff
 
New Post 1/11/2007 2:43 PM
  Jeff Dell
251 posts
www.activeworx.com
1st Level Poster


Re: Access sensor name/IP as parameter to restartscript 

A new build has been put online that performs what was explained in the above post.

 

Cheers,

Jeff

 
Previous Previous
 
Next Next
  Forum  IDS Policy Mana...  IDS Policy Mana...  Access sensor name/IP as parameter to restartscript
 
 
Copyright 2000-2007 by Activeworx, Inc.
All trademarks and copyrights on this page are owned by their respective owners.