Cli Scripts - D-Link NetDefend DFL-210 User Manual

Network security firewall
Hide thumbs Also See for NetDefend DFL-210:
Table of Contents

Advertisement

2.1.5. CLI Scripts

The CLI Reference Guide uses the command prompt gw-world:/> throughout.
Activating and Committing Changes
If any changes are made to the current configuration through the CLI, those changes will not be
uploaded to NetDefendOS until the command:
gw-world:/> activate
is issued. Immediately following the activate command, the command:
gw-world:/> commit
should be issued to make those changes permanent. If a commit command is not issued within a
default time period of 30 seconds then the changes are automatically undone and the old
configuration restored.
Explicity Checking Configuration Integrity
After changing a configuration on the D-Link Firewall, and before the activate/commit commands,
it is possible to explicitly check for any problems in a configuration using the command:
gw-world:/> show -errors
This will cause NetDefendOS to scan the configuration about to be activated and list any problems.
A possible problem that might be found in this way is a reference to an IP object in the Address
Book that does not exist in a restored configuration backup.
Logging off from the CLI
After finishing working with the CLI, it is recommended to logout in order to avoid letting anyone
getting unauthorized access to the system. Log off by using the exit or the logout command.
2.1.5. CLI Scripts
To allow the administrator to easily store and execute sets of CLI commands, NetDefendOS
provides a feature called CLI scripting. A CLI script is a predefined sequence of CLI commands
which can be executed after they are saved to a file and the file is then uploaded to the D-Link
Firewall.
The steps for creating a CLI script are as follows:
1.
Create a text file with a text editor containing a sequential list of CLI commands, one per line.
The D-Link recommended convention is for these files to use the file extension .sgs (Security
Gateway Script). The filename, including the extension, should not be more than 16 characters.
2.
Upload the file to the D-Link Firewall using Secure Copy (SCP). Script files must be stored in
a directory under the root called /scripts. SCP uploading is discussed in detail in Section 2.1.6,
"Secure Copy".
3.
Use the CLI command script -execute to run the script file.
The CLI script command is the tool used for script management and execution. The complete
Note
When the command line prompt is changed to a new string value, this string also
appears as the new device name in the top level node of the WebUI tree-view.
Chapter 2. Management and Maintenance
36

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents