- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-22-2015 10:50 AM
Good evening
I often have to configure a hundred new address objects at a time and then add them to an address group.
I prepare the config by using Excel to combine columns with different values until I have the string of txt that I can paste into the CLI to add these objects to the PA.
Here is an example of some of the lines of code I end up with:
set vsys vsys11 address net_1.2.3.0 ip-netmask 1.2.3.0/24
set vsys vsys11 address net_2.2.3.0 ip-netmask 2.2.3.0/24
set vsys vsys11 address net_3.2.3.0 ip-netmask 3.2.3.0/24
Each line of code is formatted in the same way and I know this is the correct format for adding an address object.
However, when I copy and paste multiple lines of CLI code into the configure prompt - I get invalid syntax errors with some lines of code.
Sometimes the PA does not include the whole string or misses off the /24 netmask at the end so the PA throws an invalid syntax error.
If I paste each line of code in individually, I do not get any errors but I'm trying to save time here so want to be able to paste in 100+lines of code at once with confidence that there will not be any errrors.
I'm wondering if it is the text editor I'm using or perhaps my copy of Secure CRT doesn't seem to interpret the CLI copied from the clipboard properly.
Has anyone else ever come across this type of issue or can anyone give any advice on best practices when entering 100's of lines of code onto the CLI.
Any advice or feedback would be greatly appreciated.
10-22-2015 11:47 AM
Hi,
This solution might help you:
Regards,
Benjamin
10-22-2015 11:44 AM
Hello,
While i havent tried to perform this on a PAN, I know in switches and routers when I do this i always have to double check since the paste operation isnt always perfect. This is with different vendors. I usually end up just copying smaller groups to get what I need accomplished. Perhaps the following links may help?
https://live.paloaltonetworks.com/t5/Documentation-Articles/Dynamic-Address-Objects/ta-p/61300
Hope this helps!
10-22-2015 11:47 AM
Hi,
This solution might help you:
Regards,
Benjamin
10-23-2015 09:30 AM
Thanks a lot! Done the ACE but it doesn't mention this at all!
I love cli scripting-mode!
10-23-2015 09:31 AM
Thanks for the suggestion!
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 LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!