Forum Discussion
Run Bash script from iRule
You can technically call into Bash from an iRule in a number of ways actually, but as Mr. Davies expresses, you're calling a management plane function from the data plane. You could potentially overwhelm the management plane if you attempt to send too much traffic, or present a security risk to the system if you don't properly validate what you're sending. That said, there are at least three ways to send information to the management plane for the purposes of launching a Bash script:
-
Syslog - you can simply configure syslogng to listen for a specific message or log facility and launch some Linux process.
-
iCall - similar to the syslog approach but much more flexible.
https://devcentral.f5.com/wiki/iCall.HomePage.ashx
-
iControlREST call via iRules sideband call - I should note here that this is the only method that can actually receive a response from the Bash command.
https://devcentral.f5.com/questions/icontrolrest-115-execute-bash-command
I suppose for what you want to do, the third option is probably your best bet, and you can definitely run that from an iRule event agent in the VPE.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
