Creating custom variables
Global custom variables can be created for all SNS firewalls connected to the SMC server, and can be used in:
- Host, Network and IP address range network objects in order to create objects with IP addresses that will be determined dynamically according to the firewall,
- SNS scripts in order to execute grouped commands on your pool of firewalls,
- CBQ and traffic shapers to customize bandwidth values in QoS.
Custom variables can be added in any firewall's properties.
To set the values of each variable for specific firewalls, you need to go to the properties of the firewalls in question, provided that you hold write access privileges on these firewalls.
Custom variables can be modified or deleted, as long as they are not used in the configuration of firewalls on which you do not have write access privileges. You can check where firewalls are being used as shown below. For more information, refer to the section Restricting folder administrators' access privileges.
You can create as many customized variables as needed.
- Go to Monitoring > Firewalls or Configuration > Firewalls and folders,
- Scroll over to the name of any firewall and click the pen icon , or double-click the line on which the firewall is found,
- Go to the System > Customized variables tab. You can access the same Customized variables table shown in the table from any firewall; it allows you to customize the values of variables for the current firewall, as shown in the following section.
- Click on Manage global variables.
Several actions can then be performed in the window:
- Whenever you click on Add and enter a name for the variable, the syntax %CUSTOM_X% will automatically be applied to the name. Spaces and dashes are not supported in variable names.
- Existing variables can be deleted, unless they are being used in objects.
- The Copy to clipboard button allows you to copy the variable in order to use it in network objects.
- The Check usage button displays all the firewalls and objects that use the variable. It can also be found in the Custom variables tab. In the results panel that opens in the lower part of the window, you can click on items to display and modify them.
- Variables can be exported and imported in CSV format. The columns in a CSV file are: #variable,#comment,#firewall,#value. Importing variables makes it possible to create or modify other variables, but not delete existing variables.
- Variables can be commented. Comments and variables can be seen in every firewall's properties, but can only be modified in the Manage global variables window.
Values of variables do not have to be defined for all firewalls.
To define the value of a variable for a specific firewall:
- Go to the System > Customized variables tab in the firewall's settings,
- Double-click on the Value on the firewall column to assign a value to the variables defined in the previous step.
Variable names and comments are common fields for all firewalls. Click on Manage global variables to edit them.