- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
What would you do if you were asked to add 1,000 IP address objects to your firewall using the CLI? Will you add them line by line typing each line out? Ain't nobody got time for that! Instead, be smart about it and with some preparation you can add configuration in bulk to your firewall.
This week, I saw a question in the discussions area that I've definitely seen before. This particular user wanted to know how he could add IP addresses in bulk onto the device using the CLI. I've seen similar questions in the past of users asking how they can add a large chunk of configuration (not limited to IP address objects) onto the firewall using the CLI.
Before you start, I'd recommend getting a good text editor. Some editors may add weird formatting that could cause issues when adding the configuration to the firewall, so you might have to experiment to find one that doesn't do that. The goal is to remove all the weird formatting that may have been added by the editor and keep a clean line-by-line configuration. This is required for the copy/paste to work as intended.
username@hostname# set cli scripting-mode on
<paste all the lines from your notepad here>
username@hostname# set cli scripting-mode off
Note: When in scripting-mode, it's not possible to use "Tab" to auto-complete commands or use the "?" to get help on command syntax. Don't forget to switch back to regular mode when you're done pasting your commands as shown in the example above.
How to Import and Export Address and Address Objects
How to Import Address Objects in CSV to PA Firewall
Increase Paste Buffer on PAN (or other import methods)
Bulk Upload of Set Commands in PAN-OS
Palo Alto CLI Scripting Mode Limitation
Feel free to share your questions, comments and ideas in the section below.
Thank you for taking time to read this blog.
Don't forget to hit the Like (thumbs up) button and to Subscribe to the LIVEcommunity Blog area.
Kiwi out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Subject | Likes |
---|---|
5 Likes | |
3 Likes | |
3 Likes | |
3 Likes | |
2 Likes |
User | Likes Count |
---|---|
12 | |
4 | |
3 | |
3 | |
2 |