GMS_CLI
The GMS CLI may be accessed either locally (directly from a prompt on the GMS machine), or remotely (through an SSL connection using the SonicWALL GMS CLI Server-Client).
To access the CLI locally:
1. Open the command-line prompt.
2. Change to the following directory:
sonicwall_directory\cli
where sonicwall_directory is the location where Dell SonicWALL GMS is installed.
3. Enter one of the following commands:
• For Windows NT, enter: sgms
4. Perform any of the commands described in CLI Commands.
5. To exit from the Dell SonicWALL GMS CLI, enter the following command: sgms> quit
The GMS CLI Server feature allows for remote clients to connect and administer CLI commands over a secure SSL connection using a lightweight Java client. The CLI server uses the gmsvpserverks (SonicWALL Self-Signed) keystore.
This section provides instructions to configure both server and client for remote CLI access.
Note The default port for the CLI service is 5555. Ensure that this port is opened on your perimeter firewall or UTM device in order for a connection to be established. This port is configurable in the <gmsvp>/CLI/cliserver/liserver.properties file.
Using the Remote Client
To access the CLI remotely:
1. Unzip and install the CLIClient.zip bundle on the client system. This file is found inside the CLI directory on your GMS or ViewPoint system.
2. On the client system, run the remote client from a command prompt.
3. Enter the network configuration information for your remote server as prompted.
Note: On the client system, verify that the “JAVA_HOME” environment variable is set to the “JRE/JDK” install directory.
4. Perform any commands as you would using a local CLI prompt. These commands are described in CLI Commands.
5. To exit from the Dell SonicWALL GMS CLI, enter the following command: sgms> quit
This section provides both syntax and usage guidelines for common GMS CLI commands. This section contains the following sub-sections:
• Executing a Command without Logging In
• Adding and Removing Activation Codes
• Monitoring Tunnel Statistics
• Synchronizing Tunnel Information
To log in to the Dell SonicWALL GMS CLI, use the sgms login command: sgms > login username password
Syntax
|
Usage Guidelines
When this command is entered, Dell SonicWALL GMS does the following:
• Checks whether the command is entered with the correct parameters.
– If the command is not entered correctly, it returns the correct form of the command.
• Checks the validity of the username and password.
• Executes the login command.
• Creates a new session with a randomly generated session ID.
• Returns any command output.
Example
In the following example, the user admin logs in using the password “password.”
sgms> login admin password
To log out from the Dell SonicWALL GMS CLI, use the logout command.
sgms> logout
Usage Guidelines
When this command is entered, Dell SonicWALL GMS does the following:
• Executes the logout command.
• Closes the session.
• Returns to the SGMS prompt from which you can login again.
Executing a Command without Logging In
To execute a command without logging in to the Dell SonicWALL GMS CLI, use the login command.
sgms> login -L “username password” -C “command parameter”
Syntax
|
Usage Guidelines
When this command is entered, Dell SonicWALL GMS does the following:
• Checks whether the command is entered with the correct parameters.
– If the command is not entered correctly, it returns the correct form of the command.
• Checks the validity of the username and password.
• Executes the login command.
• Creates a new session with a randomly generated session ID.
• Executes the command.
• Closes the session and exits.
Example
In the following example, the user admin logs in using the password “password” and runs an addunit command.
sgms> login -L admin password -C addunit new_sonicwall.xml
To add one or more SonicWALL appliances to Dell SonicWALL GMS using the CLI, use the addunit command.
sgms> addunit xml_file
Syntax
|
Usage Guidelines
The XML file should contain the following:
<?xml version ="1.0" ?>
<sgmscommand>
: <command>addUnit</command>
: <FirewallList>
: <FirewallInfo>
: <SonicwallName>sonicwall_name</sonicwallName>
: <SonicwallPassword>password</sonicwallPassword>
: <IpAddress>ip_address</ipAddress>
: <SerialNumber>serial_number</serialNumber>
: <SAencryptionKey>encrypt_key</SAencryptionKey>
: <SAAuthKey>auth_key</SAAuthKey>
: <AntivirusPassword>av_password</antivirusPassword>
: <SchedulerIPAddress>scheduler_ip</schedulerIPAddress>
: <StandbySchedulerIP>standby_ip</standbySchedulerIP>
: <UseVPN>use_vpn</useVPN>
: <supportRavlin>ravlin_bit</supportRavlin>
: <snmpRead>read_string</snmpRead>
: <snmpWrite>write_string</snmpWrite>
: <httpsMgmt>https_bit</httpsMgmt>
: <managedOnLanIP>managedon_lanip</managedOnLanIP>
: <StandbyManagedAtWan>standbymanaged_atwan</standbyManagedAtWan>
: <CustomInfo>
: : <Customfield01>field_01</Customfield01>
: : <Customfield02>field_02</Customfield02>
: : ...
: : <Customfield10>field_10</Customfield10>
: </CustomInfo>
: <userList>
: : <user>user_01</user>
: : <user>user_02</user>
: : ...
: </userList>
: </FirewallInfo>
: <FirewallInfo>
: (SonicWALL Configuration Information)
: </FirewallInfo>
: <FirewallInfo>
: (SonicWALL Configuration Information)
: </FirewallInfo>
: </FirewallList>
</sgmscommand>
|
Example
In the following example, two new SonicWALL appliances are added to Dell SonicWALL GMS:
sgms> addunit new_sonicwall.xml
The following is the content of new_sonicwall.xml.
<?xml version ="1.0" ?>
<sgmscommand>
: <command>addUnit</command>
: <FirewallList>
: <FirewallInfo>
: <sonicwallName>ABC14</sonicwallName>
: <sonicwallPassword>abc</sonicwallPassword>
: <ipAddress></ipAddress>
: <serialNumber>00F12211F114</serialNumber>
: <SAencryptionKey>1234567812345678</SAencryptionKey>
: <SAuthKey>12345678123456781234567812345678</SAuthKey>
: <antivirusPassword>avpass</antivirusPassword>
: <schedulerIPAddress>192.168.168.168</schedulerIPAddress>
: <useVPN>1</useVPN>
: <standbyManagedAtWan>1</standbyManagedAtWan>
: <standbySchedulerIP>192.168.168.23</standbySchedulerIP>
: <supportRavlin>1</supportRavlin>
: <snmpRead>abcdef12</snmpRead>
: <snmpWrite>abcdef12</snmpWrite>
: <httpsMgmt>0</httpsMgmt>
: <manageOnLanIP>0</manageOnLanIP>
: <CustomInfo>
: <Company>SonicWAll</Company>
: <Country>China</Country>
: <State>California</State>
: <Department>Engineering</Department>
: </CustomInfo>
: <userList>
: : <user>billb</user>
: : <user>dana</user>
: </userList>
: </FirewallInfo>
: <FirewallInfo>
: <sonicwallName>XYZ26</sonicwallName>
: <sonicwallPassword>abc</sonicwallPassword>
: <ipAddress></ipAddress>
: <serialNumber>00F1434CE265</serialNumber>
: <SAencryptionKey>1234567812345678</SAencryptionKey>
: <SAuthKey>123456781234567812345678abcdef89</SAuthKey>
: <antivirusPassword></antivirusPassword>
: <schedulerIPAddress>192.168.168.168</schedulerIPAddress>
: <useVPN>1</useVPN>
: <standbyManagedAtWan>1</standbyManagedAtWan>
: <standbySchedulerIP>192.168.168.23</standbySchedulerIP>
: <httpsMgmt>0</httpsMgmt>
: <manageOnLanIP>0</manageOnLanIP>
: <CustomInfo>
: : <Company>SonicWAll</Company>
: : <Country>China</Country>
: : <State>California</State>
: : <Department>Engineering</Department>
: </CustomInfo>
: </FirewallInfo>
: </FirewallList>
</sgmscommand>
Note A sample of this file, sample_nodes.xml, is located in the Misc directory on the SonicWALL GMS CD-ROM.
To add users, use the addusers command.
sgms> addusers xml_file
Syntax
|
Usage Guidelines
The XML file should contain the following:
<? Xml version ="1.0" >
<Sgmscommand>
: <AddUsers>
: <AddUser>
: <UserAccountInfo>
: <Name>username</Name>
: <Password>password</Password>
: <UserTypeName>group</UserTypeName>
: <DefaultViewName>viewname</DefaultViewName>
: <FirstName>firstname</FirstName>
: <MiddleName>middlename</MiddleName>
: <LastName>lastname</LastName>
: <Phone>phone</Phone>
: <Fax>fax</Fax>
: <Email1>email</Email1>
: <Email2>email2</Email2>
: <Timeout>timeout_period</Timeout>
: </UserAccountInfo>
: <UserPermsInfo>
: <UserScreenList>
: <UserScreen pathname="screenpath" permtype="permission_type"> </UserScreen>
: </UserScreenList>
: <UserNodeList>
: <UserNode displayname="node" viewname="viewname" operationtype="optype"></UserNode>
: </UserNodeList>
: <UserActionList>
: <AddUnit>permission</AddUnit>
: <ModifyUnit>permission</ModifyUnit>
: <DeleteUnit>permission</DeleteUnit>
: <RenameUnit>permission</RenameUnit>
: <ModifyProperties>permission</ModifyProperties>
: <ReassignAgents>permission</ReassignAgents>
: <AddDeleteModifyView>permission</AddDeleteModifyView>
: <ChangeView>permission</ChangeView>
: <AllowCLI>permission</AllowCLI>
: </UserActionList>
: </UserPermsInfo>
: </AddUser>
: </AddUsers>
: </Sgmscommand>
|
Example
In the following example, the user Linda is added:
sgms> addusers linda.xml
The following is the content of linda.xml.
<? Xml version ="1.0" >
<Sgmscommand>
: <AddUsers>
: <AddUser>
: <UserAccountInfo>
: <Name>Linda</Name>
: <Password>password</Password>
: <UserTypeName>Operators</UserTypeName>
: <DefaultViewName>ISPView</DefaultViewName>
: <FirstName>Linda</FirstName>
: <MiddleName></MiddleName>
: <LastName>Griffith</LastName>
: <Phone>(408)111-2222</Phone>
: <Fax>(408)222-3333</Fax>
: <Email1>lgriffith@sonicwall.com</Email1>
: <Email2></Email2>
: <Timeout>40</Timeout>
: </UserAccountInfo>
: <UserPermsInfo>
: <UserScreenList>
: <UserScreen pathname="Console/Management/Users" permtype="Read Only"> </UserScreen>
: <UserScreen pathname="Policies/Access/General" permtype="Read/Write"></UserScreen>
: </UserScreenList>
: <UserNodeList>
: <UserNode displayname="Palo Alto1" viewname="ISPView" operationtype="Add"></UserNode>
: <UserNode displayname="Houston 1" viewname="View All" operationtype="Add"></UserNode>
: </UserNodeList>
: <UserActionList>
: <AddUnit>allow</AddUnit>
: <ModifyUnit>allow</ModifyUnit>
: <DeleteUnit>deny</DeleteUnit>
: <RenameUnit>deny</RenameUnit>
: <ModifyProperties>deny</ModifyProperties>
: <ReassignAgents>deny</ReassignAgents>
: <AddDeleteModifyView>allow</AddDeleteModifyView>
: <ChangeView>allow</ChangeView>
: <AllowCLI>deny</AllowCLI>
: </UserActionList>
: </UserPermsInfo>
: </AddUser>
: </AddUsers>
: </Sgmscommand>
To change user settings, use the changeusers command. This command is similar to the addusers command.
sgms> changeusers xml_file
Syntax
|
Usage Guidelines
The XML file can contain the following:
<? Xml version ="1.0" >
<Sgmscommand>
: <AddUsers>
: <AddUser>
: <UserAccountInfo>
: <Name>username</Name>
: <Password>password</Password>
: <UserTypeName>group</UserTypeName>
: <DefaultViewName>viewname</DefaultViewName>
: <FirstName>firstname</FirstName>
: <MiddleName>middlename</MiddleName>
: <LastName>lastname</LastName>
: <Phone>phone</Phone>
: <Fax>fax</Fax>
: <Email1>email</Email1>
: <Email2>email2</Email2>
: <Timeout>timeout_period</Timeout>
: </UserAccountInfo>
: <UserPermsInfo>
: <UserScreenList>
: <UserScreen pathname="screenpath" permtype="permission_type"> </UserScreen>
: </UserScreenList>
: <UserNodeList>
: <UserNode displayname="node" viewname="viewname" operationtype="optype"></UserNode>
: </UserNodeList>
: <UserActionList>
: <AddUnit>permission</AddUnit>
: <ModifyUnit>permission</ModifyUnit>
: <DeleteUnit>permission</DeleteUnit>
: <RenameUnit>permission</RenameUnit>
: <ModifyProperties>permission</ModifyProperties>
: <ReassignAgents>permission</ReassignAgents>
: <AddDeleteModifyView>permission</AddDeleteModifyView>
: <ChangeView>permission</ChangeView>
: <AllowCLI>permission</AllowCLI>
: </UserActionList>
: </UserPermsInfo>
: </AddUser>
: </AddUsers>
: </Sgmscommand>
|
Example
In the following example, new information is updated for the users Linda and Mike:
sgms> addusers linda.xml
The following is the content of linda-mike.xml.
<? Xml version ="1.0" >
<Sgmscommand>
: <AddUsers>
: <AddUser>
: <UserAccountInfo>
: <Name>Linda</Name>
: <Password>new-password</Password>
: <Phone>(408)555-1212</Phone>
: <Email1>linda@sonicwall.com</Email1>
: <Timeout>70</Timeout>
: </UserAccountInfo>
: </AddUser>
: <AddUser>
: <UserAccountInfo>
: <Name>Mike</Name>
: <Password>new-password</Password>
: <Phone>(408)555-1233</Phone>
: <Email1>mike@sonicwall.com</Email1>
: <Timeout>60</Timeout>
: </UserAccountInfo>
: </AddUser>
: </AddUsers>
: </Sgmscommand>
To delete users, use the deleteuser command.
sgms> deleteuser username
Syntax
|
Example
In the following example, the user Linda is deleted:
sgms> deleteuser linda
To delete users, use the deleteusers command.
sgms> deleteusers xml_file
Syntax
|
Usage Guidelines
The XML file should contain the following:
<? Xml version ="1.0" >
<Sgmscommand>
: <DeleteUsers>
: <DeleteUser username="username"></DeleteUser>
: <DeleteUser username="username"></DeleteUser>
: </DeleteUsers>
: </Sgmscommand>
|
Example
In the following example, the users John, Linda, and Albert are deleted:
sgms> deleteuser deleteusers.xml
The following is the content of deleteusers.xml.
<? Xml version ="1.0" >
<Sgmscommand>
: <DeleteUsers>
: <DeleteUser username="John"></DeleteUser>
: <DeleteUser username="Linda"></DeleteUser>
: <DeleteUser username="Albert"></DeleteUser>
: </DeleteUsers>
: </Sgmscommand>
Adding and Removing Activation Codes
To add or remove activation codes for SonicWALL appliances, use the activationcode command.
sgms> activationcode xml_file
Syntax
|
Usage Guidelines
The XML file should contain the following:
<? Xml version ="1.0" >
<Sgmscommand>
: : <Activation>command_type</Activation>
: : : <Activation values>
: : : : : <Activation category>category</Activation _category >
: : : : : : <Activation type>activation_type</Activation type>
: : : </Activation values>
: : : <Codes>
: : : : : : <Code>code</code>
: : : : : : <Code>code</code>
: : : : </Codes>
: </Sgmscommand>
|
Example
In the following example, four 100 Node Anti-Virus activation codes are added to Dell SonicWALL GMS:
sgms> activationcode new_virus_codes.xml
The following is the content of new_virus_codes.xml.
<? Xml version ="1.0" >
<Sgmscommand>
: : <Activation>add</Activation>
: : : <Activation values>
: : : : : <Activation category>Anti-Virus</Activation _category >
: : : : : : <Activation type>100 Nodes</Activation type>
: : : </Activation values>
: : : <Codes>
: : : : : : <Code>12345678</code>
: : : : : : <Code>23456780</code>
: : : : : : <Code>34567890</code>
: : : : : : <Code>45678901</code>
: : : : </Codes>
: </Sgmscommand>
Note A sample of the file is available on the SonicWALL GMS CD-ROM. It is called sample_activationcode.xml and is located in the Misc directory.
Deleting Nodes Using the CLI
To delete a single node, use the deletenode command.
sgms> deletenode displayname viewname [deleteSAs {0 | 1}]
Syntax
|
Example
In the following example, the node “Timbuktu52” and its SAs are deleted.
sgms> deletenode Timbuktu52 NewView deleteSAs 1
To delete nodes or groups, use the deletenodes command.
sgms> deletenodes xml_file
Syntax
|
Usage Guidelines
The XML file should contain the following:
<? Xml version ="1.0" >
<Sgmscommand>
: <DeleteNodes>
: <DeleteNode displayname="displayname" viewname="viewname" deleteSAs="0" />
: </DeleteNodes>
: </Sgmscommand>
|
Example
In the following example, “Palo Alto 4” and all nodes within the specified groups are deleted:
sgms> activationcode node-delete.xml
The following is the content of node-delete.xml.
<? Xml version ="1.0" >
<Sgmscommand>
: <DeleteNodes>
: <DeleteNode displayname="Country=USA:State=California:Department=Engineering:Company=
: Silicon Valley" viewname="View All" deleteSAs="1" />
: <DeleteNode displayname="Palo Alto 4" viewname="View All" deleteSAs="0" />
: </DeleteNodes>
: </Sgmscommand>
To monitor the status of a VPN tunnel, use the vpnmonitor status command.
sgms> vpnmonitor status firewall-sn [type {up | down | all }]
Syntax
|
Note This command causes the SonicWALL appliance to display the first five VPN tunnels. If the SonicWALL appliance has more than 5 tunnels, enter the vpnmonitor N command to display the next page of results.
Example
In the following example, the status of each VPN tunnel for the SonicWALL appliance with serial number 004010126FB0 is displayed:
sgms> vpnmonitor status 004010126FB0
-----------------------------------------------------------------------------
SA NAME: GroupVPN
LAST UPDATED: Mar 22, 2004 Mon [11:49 AM]
Tunnel ID Status Destination Address Range
MT107998499199600B0D01FDBF8 Down 0.0.0.0 - 0.0.0.0
-----------------------------------------------------------------------------
SA NAME: SGMS-0006B1040148
LAST UPDATED: Mar 22, 2004 Mon [11:49 AM]
Tunnel ID Status Destination Address Range
MT107998499489000B0D01FDBF8 Up 10.0.14.43 - 10.0.14.43
-----------------------------------------------------------------------------
SA NAME: SGMS-0006B1044046
LAST UPDATED: Mar 22, 2004 Mon [11:49 AM]
Tunnel ID Status Destination Address Range
MT107998499529000B0D01FDBF8 Up 10.0.14.44 - 10.0.14.44
-----------------------------------------------------------------------------
SA NAME: SGMS-00401012550C
LAST UPDATED: Mar 22, 2004 Mon [11:49 AM]
Tunnel ID Status Destination Address Range
MT107998499428900B0D01FDBF8 Up 10.0.14.45 - 10.0.14.45
-----------------------------------------------------------------------------
Displayed 0 to 4 of 4 rows.
To view the statistics for a VPN tunnel, use the vpnmonitor statistics command.
sgms> vpnmonitor statistics tunnel-id
Syntax
|
Example
In the following example, the statistics for tunnel MT107998499428900B0D01FDBF8 are displayed:
sgms> vpnmonitor statistics MT107998499428900B0D01FDBF8
Statistics for tunnel MT107998499428900B0D01FDBF8
-------------------------------------------------------------------
SA Name: SGMS-00401012550C
Gateway: 10.0.14.45
Source Address Range: 0.0.0.0 - 255.255.255.255
Destination Address Range: 10.0.14.45 - 10.0.14.45
Creation Time: 03/19/2004 10:43:34
Expiry Time: SaUpTime: No Expiry
Packets In: 18822
Packets Out: 2941
Bytes In: 267
Bytes Out: 103
Fragmented Packets In: 0
Fragmented Packets Out: 0
-------------------------------------------------------------------
To refresh a tunnel, use the vpnmonitor refresh command.
sgms> vpnmonitor refresh tunnel-id
Syntax
|
Example
In the following example, tunnel MT107998499428900B0D01FDBF8 is refreshed:
sgms> vpnmonitor refresh MT107998499428900B0D01FDBF8
To renegotiate a VPN tunnel, use the vpnmonitor renegotiate command.
sgms> vpnmonitor renegotiate tunnel-id
Syntax
|
Example
In the following example, tunnel MT107998499428900B0D01FDBF8 is renegotiated:
sgms> vpnmonitor renegotiate MT107998499428900B0D01FDBF8
Synchronizing Tunnel Information
To synchronize VPN information for a SonicWALL appliance with Dell SonicWALL GMS, use the vpnmonitor synchronize command.
sgms> vpnmonitor synchronize firewall-sn
Syntax
|
Example
In the following example, tunnel status information for each VPN tunnel on the SonicWALL appliance with serial number 004010126FB0 is synchronized with Dell SonicWALL GMS:
sgms> vpnmonitor synchronize 004010126FB0
Configuring SonicWALL Parameters
This section describes how to use the configure command to execute a group of commands using an XML configuration file.
To execute a group of commands in an XML configuration file, use the configure command.
sgms> configure xml_file
Note For information on creating a configuration file, see Preparing a Configuration File.
Syntax
|
Usage Guidelines
When this command is entered, Dell SonicWALL GMS does the following:
• Checks whether the command is entered with the correct parameters.
– If the command is not entered correctly, it returns the correct form of the command.
• Checks the validity of the XML file.
• Executes the command.
• Closes the session and exits.
Example
In the following example, the user admin logs in using the password “password” and runs an addunit command.
sgms> configure configure.xml
Preparing a Configuration File
Configuration files can be used to set, add, or delete parameters that are normally only accessible from the Dell SonicWALL GMS UI. Additional examples of XML files are found in the SGMS2/CLI directory. The following is the format of an XML configuration file:
Note For information on configuration parameters, see Configuration Parameters.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE Configure [
: <!ELEMENT Configure (Task*)>
: <!ELEMENT Task (SetParam*,DelParam*,AddParam*)>
: <!ATTLIST Task
: : : displayname: : CDATA: #REQUIRED
: : : viewname: : CDATA : #REQUIRED
: : : updatetype: : CDATA : #REQUIRED
: : : tasktype: : CDATA: #REQUIRED
: : : description : : CDATA: #REQUIRED>
: <!ELEMENT SetParam EMPTY>
: <!ATTLIST SetParam
: : : setParamName: : CDATA: #REQUIRED
: : : setParamValue: : CDATA: #REQUIRED>
: <!ELEMENT DelParam EMPTY>
: <!ATTLIST DelParam
: : : delParamName: : CDATA: #REQUIRED
: : : delParamValue: : CDATA: #REQUIRED>
: <!ELEMENT AddParam EMPTY>
: <!ATTLIST AddParam
: : : addParamName: : CDATA: #REQUIRED
: : : addParamValue: : CDATA: #REQUIRED>:
]>
<Configure>
: <Task
: : displayname="firewall_parameters"
: : viewname="view_name"
: : updatetype="update_type"
: : tasktype="task_type"
: : description="description"
: : >
: <AddParam addParamName="add_parameter_name" addParamValue="add_parameter_value"/>
: <AddParam setParamName="set_parameter_name" setParamValue="set_parameter_value"/>
: : </Task>
</Configure>
|
Modifying SonicWALL Parameters
This section describes how to use the ModifyArray command to change SonicWALL appliance settings using an XML configuration file.
To modify a SonicWALL parameter setting, use the ModifyArray command.
sgms> modifyarray xml_file
Note For information on creating a configuration file, see Preparing a Parameter Modification File.
Syntax
|
Usage Guidelines
When this command is entered, Dell SonicWALL GMS does the following:
• Checks whether the command is entered with the correct parameters.
– If the command is not entered correctly, it returns the correct form of the command.
• Checks the validity of the XML file.
• Executes the command.
• Closes the session and exits.
Example
In the following example, the value of the secondary phone number is changed to the number specifed in the primary phone number field and the primary phone number is changed to 800-555-1212.
sgms> modifyarray modify.xml
The following is the content of modify.xml.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE Configure (View Source for full doctype...)>
: <Configure>
: <Task displayname="root" viewname="AGENTCompany" description="Modify SP Profiles" arraytable
: name="SW_PROFILES" indidxcolumnname="dialupProfileInUse_0">
: <ArrayIndexColumnName paramName="dialConfigName" />
: <ModParam paramName="secPhone" paramValue="%priPhone%" />
: <ModParam paramName="priPhone" paramValue="[18005551212]" />
: </Task>
: </Configure>
Preparing a Parameter Modification File
Modification files can be used to change parameters that are normally only accessible from the Dell SonicWALL GMS UI. For example, you can change the DNS Settings of the first DNS server to a specific new address or you can set the IP address of the first DNS server to the IP address of the second server for each selected SonicWALL appliance.
The following is the format of an XML modification file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE Configure [
: <!ELEMENT Configure (Task*)>
: <!ELEMENT Task (ArrayIndexColumnName*,ModParam*)>
: <!ATTLIST Task
: : : displayname: : CDATA: : #REQUIRED
: : : viewname : : CDATA: : #REQUIRED
: : : description : : CDATA: : #REQUIRED
: : : arraytablename : : CDATA: : #REQUIRED
: : : indidxcolumnname: : CDATA: : #REQUIRED>
: <!ELEMENT ArrayIndexColumnName: : EMPTY>
: <!ATTLIST ArrayIndexColumnName
: : : paramName: CDATA: : #REQUIRED>
: <!ELEMENT ModParam: : EMPTY>
: <!ATTLIST ModParam
: : : paramName: CDATA: : #REQUIRED
: : : paramValue: CDATA: : #REQUIRED>
: :
]>
<Configure>
: <Task displayname="firewall_parameters"
viewname="view_name"
description="description"
arraytablename="SW_PROFILES"
: : indidxcolumnname="dialupProfileInUse_0"
: >
: <ArrayIndexColumnName paramName="column_name"/>
: <ModParam paramName="secPhone" paramValue="param_value"/>
: <ModParam paramName="priPhone" paramValue="param_value"/>
: </Task>
</Configure>
|
For the latest list of available CLI configuration parameters, see the SonicWALL GMS CLI Reference Guide, which is available at the following URL:
http://www.sonicwall.com/us/Support.html
This chapter contains information on how to retrieve parameters that can be used with the command-line interface (CLI) configure command.
This section describes parameters that can be configured for the time screen of the System tree. To get firewall parameters list that needs to be configured on firmware, it is necessary to query the back-end database. To configure the time screen, perform the following steps:
1. Open Query Analyzer select sgmsdb database, then execute following queries:
– Select id from screens where name like 'Time'. Output: 1003
– Query to get details of parameters.
– Select prefs_file_name,independent,default_value from params_info where prefs_file_name in (Select param_name from sub_policy where screen_id = 1003)
provides the parameters returned for above query.
|
Grouping independent and array parameters from above query results
– Independent Parameter list: ntp_updateInterval, ntp_useDst, ntp_useNtp, ntp_utcLogs, timezone, useInternational (Independent attribute value 0)
– Array List: addCustomNTPServer (Independent attribute value 1)
The following provides the XML to configure the Array parameters of the time screen:
<!ELEMENT Task (SetParam*,DelParam*,AddParam*)>
<!ATTLIST Task
displayname CDATA #REQUIRED
viewname CDATA #REQUIRED
updatetype CDATA #REQUIRED
tasktype CDATA #REQUIRED
description CDATA #REQUIRED>
<!ELEMENT SetParam EMPTY>
<!ATTLIST SetParam
setParamName CDATA #REQUIRED
setParamValue CDATA #REQUIRED>
xml_file The XML file that contains configuration instructions.
Using the Command Line Interface 27
<!ELEMENT DelParam EMPTY>
<!ATTLIST DelParam
delParamName CDATA #REQUIRED
delParamValue CDATA #REQUIRED>
<!ELEMENT AddParam EMPTY>
<!ATTLIST AddParam
addParamName CDATA #REQUIRED
addParamValue CDATA #REQUIRED>
]>
<Configure>
<Task
displayname="firewall_parameters"
viewname="view_name"
updatetype="update_type"
tasktype="task_type"
description="description"
>
<AddParam addParamName=" addCustomNTPServer " addParamValue="10.0.0.1"/>
</Task>
</Configure>
The following provides the the XML to configure independent parameters for the time screen.
<!ELEMENT Task (SetParam*,DelParam*,AddParam*)>
<!ATTLIST Task
displayname CDATA #REQUIRED
viewname CDATA #REQUIRED
updatetype CDATA #REQUIRED
tasktype CDATA #REQUIRED
description CDATA #REQUIRED>
<!ELEMENT SetParam EMPTY>
<!ATTLIST SetParam
setParamName CDATA #REQUIRED
setParamValue CDATA #REQUIRED>
xml_file The XML file that contains configuration instructions.
Using the Command Line Interface 27
<!ELEMENT DelParam EMPTY>
<!ATTLIST DelParam
delParamName CDATA #REQUIRED
delParamValue CDATA #REQUIRED>
<!ELEMENT AddParam EMPTY>
<!ATTLIST AddParam
addParamName CDATA #REQUIRED
addParamValue CDATA #REQUIRED>
]>
<Configure>
<Task
displayname="firewall_parameters"
viewname="view_name"
updatetype="update_type"
tasktype="task_type"
description="description"
<AddParam setParamName=" ntp_updateInterval " setParamValue="30"/>
<AddParam setParamName= " ntp_useDst " setParamValue="1"/>
<AddParam setParamName=" ntp_useNtp " setParamValue="1"/>
<AddParam setParamName=" ntp_utcLogs " setParamValue="1"/>
<AddParam setParamName=" timezone " setParamValue="829"/>
<AddParam setParamName=" useInternational " setParamValue="1"/>
</Task>
</Configure>