HPE Juniper - OP Script (Python) - Shutdown multiple interfaces - Think outsite the Box
For a specific scenario, multiple interfaces on a Juniper SRX Series firewall need to be put into shutdown
Basic workflow (via serial console)
1. Enter CLI and configuration mode
cli
configure
set interfaces ge-0/0/1 disable
set interfaces ge-0/0/2 disable ......
commit
This should work fine... , wait a moment ....,. , hold my beer
I would not to bet that is going to cut some lines .... , answer was : yepp
Let´s think outside the box : hmmm, can we have a script , than can localy run on the juniper srx ?
Op scripts enable you to make controlled changes to the Junos OS configuration. Op scripts are advantageous, because they can gather operational information about a device and update the configuration based on that information .....
ouhaaa !, some kind of "magic python script" can put down the interfaces with single command - YES
DRY-RUN
COMMIT
credits outside the Box Thinking
INE Security - ejPT
OffSec / Office Hours