cancel
Showing results for 
Search instead for 
Did you mean: 
antnee777
Level 7

Trigger a restart from within the rules engine ?

Hi All,

Dont ask me why, but I have a requirement to restart webgateways on my estate at regular intervals.

A nice way to do this would be to have a rule with a very specific criteria (perhaps src IP and dst port) to match, and then trigger the restart.

Sounds a bit scary I know, but does anyone know how I might do that ?, I looked through properties and events in 7.1 - 7.3 and dont find anything that could do it.

Of course I could use REST, but I would prefer to configure this in my central policy.

Thanks

Ant

0 Kudos
8 Replies
asabban
Level 17

Re: Trigger a restart from within the rules engine ?

Hello,

I don't think this is possible with a property or event.

You can try to use the "external list" feature to make a REST call to the REST interface to restart MWG. So you could trigger the REST call from within the rule engine.

However you should ensure that this cannot be executed accidentally by any users :-)

Best,

Andre

0 Kudos
antnee777
Level 7

Re: Trigger a restart from within the rules engine ?

Hi Andre, Im listening , can you give me an example of how the external list would look ?

0 Kudos
asabban
Level 17

Re: Trigger a restart from within the rules engine ?

Hi Ant,

I just had a closer look and I noticed that we (currently) can't send POST requests with the external lists events. This is planned to be available in a future version.

It may be possible to do this in JavaScript or similar. Is it a requirement that there is  a single URL call that causes the reboot? Or would it also be acceptable to have a block page with a button that performs the reboot? (may be easier to implement)

Maybe you can share some more details about what you need. I will try to a solution.

Best,

Andre

0 Kudos
McAfee Employee

Re: Trigger a restart from within the rules engine ?

Hello,

attaching something in php (not really clean and nice, but a starting point ). In the attached lists.php is the script to use MWG's REST interface. Use parameters instead of form fields and combine that with the rules engine and external lists.

For example: If URL.Host = admin.trigger.MWG.action, call external list(http://some.server.somewhere/list.php?action=reboot,IP=<Proxy.IP>. The script will the apply the action you submitted to the proxy.ip you specified (REST needs to listen on that obviously)

Et voila, you have your reboot through a trigger in the rule engine (with the dependency of hosting a script on a server, however, I assume you have a server with php in your assets). You might want to secure the URL above with a .htaccess to avoid misusage.

Michael

0 Kudos
antnee777
Level 7

Re: Trigger a restart from within the rules engine ?

Interesting, thanks MS will give this a try, this is very much in keeping with they types of configuration we like to use

0 Kudos
antnee777
Level 7

Re: Trigger a restart from within the rules engine ?

On question, couldnt I do something similar using JQuery within a block page ?

0 Kudos
McAfee Employee

Re: Trigger a restart from within the rules engine ?

Hmm...in theory! As long as jquery can create a request to the REST, yes!

0 Kudos
antnee777
Level 7

Re: Trigger a restart from within the rules engine ?

I will give it a try, most likley the broswer will intepret this as a cross site scripting attempt, but there should be ways to supress that within the environment I think.

0 Kudos