Forum Discussion
W__Tout_99150
Nimbostratus
Nov 06, 2012Calling a shell script from within an irule
I have a shell script (/bin/sh) I need to run from within an irule. Given the below scenario:
1- I extreact a header from the HTTP request
2- I extract two parameters from the header...
Kevin_Stewart
Employee
Nov 07, 2012While you can technically do this, it doesn't mean you should. Reaching into the management shell (management plane) from an iRule (data plane) has several performance AND security implications. The management shell consumes a very small subset of total system memory, and is not multi-processing, so it could never scale to handle traffic loads. Also, creating that "bridge" between the two planes potentially opens you up to vulnerabilities if you don't properly protect the mechanisms.
Your best option, in my opinion, would be to employ a sideband call to a remote service (https://devcentral.f5.com/wiki/iRules.SIDEBAND.ashx) and allow it to perform your shell script. You could technically expose some custom service on the BIG-IP (mini web server, netcat, etc.) and reach in from your sideband call, but I'd recommend against that for the aforementioned reasons. If using a remote service, point your sideband call at another virtual server and then load balance (and scale) multiple services.
That said, what is your shell script doing? Perhaps the entire process can be done natively in iRules.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
