Forum Discussion
How to Apply Irule Through CLI: Idea is to Share the tmsh script to create a Batch script which Windows Team can work edit accordingly
I have tested in my lab and below is the set to give you a better understanding.
I have 1 vs with name test.lab.com and i created 3 irule with names as below hsl-irule-test1, hsl-irule-test2, hsl-irule-test3,
My below output will help in understanding: *root@(bigip)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual test.lab.com
ltm virtual test.lab.com { destination 10.128.10.100:http ip-protocol tcp mask 255.255.255.255 pool test_lab_pool profiles { HSL-profile { } http { } tcp { } } source 0.0.0.0/0 source-address-translation { type automap } vs-index 2 } root@(bigip)(cfg-sync Standalone)(Active)(/Common)(tmos) root@(bigip)(cfg-sync Standalone)(Active)(/Common)(tmos) run util bash [root@bigip:Active:Standalone] config tmsh mod ltm virtual test.lab.com rules {hsl-irule-test1} [root@bigip:Active:Standalone] config tmsh list ltm virtual test.lab.com ltm virtual test.lab.com { destination 10.128.10.100:http ip-protocol tcp mask 255.255.255.255 pool test_lab_pool profiles { HSL-profile { } http { } tcp { } } rules { hsl-irule-test1 } source 0.0.0.0/0 source-address-translation { type automap } vs-index 2 } [root@bigip:Active:Standalone] config [root@bigip:Active:Standalone] config tmsh mod ltm virtual test.lab.com rules {hsl-irule-test2} [root@bigip:Active:Standalone] config tmsh list ltm virtual test.lab.com ltm virtual test.lab.com { destination 10.128.10.100:http ip-protocol tcp mask 255.255.255.255 pool test_lab_pool profiles { HSL-profile { } http { } tcp { } } rules { hsl-irule-test2 } source 0.0.0.0/0 source-address-translation { type automap } vs-index 2 } [root@bigip:Active:Standalone] config [root@bigip:Active:Standalone] config tmsh mod ltm virtual test.lab.com rules {hsl-irule-test1 hsl-irule-test3} [root@bigip:Active:Standalone] config tmsh list ltm virtual test.lab.com ltm virtual test.lab.com { destination 10.128.10.100:http ip-protocol tcp mask 255.255.255.255 pool test_lab_pool profiles { HSL-profile { } http { } tcp { } } rules { hsl-irule-test1 hsl-irule-test3 } source 0.0.0.0/0 source-address-translation { type automap } vs-index 2 } [root@bigip:Active:Standalone] config
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