Rule change via CLI

Reply
Highlighted
L2 Linker

Rule change via CLI

Is there any way to remove a parameter to a security rule via the CLI?  As an example, if I created the following rule:

set rulebase security rules "Test" from inside

Now I want to change inside to outside.

If I use: set rulebase security rules "Test" from outside, I end up with "from [ inside outside ]"

I would prefer not to have to delete the rule and recreate it as I have a bulk change to do and the CLI will be faster than GUI.


Thank you,

R

Tags (1)

Accepted Solutions
Highlighted
L3 Networker

Re: Rule change via CLI

delete rulebase security rules "Test" from outside

This will leave the inside and remove the outside.

View solution in original post


All Replies
Highlighted
L7 Applicator

Re: Rule change via CLI

Hello Sir,

As per my knowledge, PAN is not having an option like "replace-pattern" (use in Juniper Firewall) to make any changes, without deleting the same config from CLI. It might come with a future release.

For the time being, you can collect all "set" command from the PAN  firewall as mentioned below:

admin@PAN> set cli config-output-format set

admin@PAN> configure

Entering configuration mode

[edit]

admin@PAN# show

Collect the output in a text file/notepad, and modify as per your requirement ( But need to delete the existing one).

Thanks

Highlighted
L3 Networker

Re: Rule change via CLI

delete rulebase security rules "Test" from outside

This will leave the inside and remove the outside.

View solution in original post

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!