D-Link NetDefend DFL-210 User Manual page 41

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

Advertisement

2.1.5. CLI Scripts
Any output from script execution will appear at the CLI console. Normally this output only consists
of any error messages that occur during execution. To see the confirmation of each command
completing, the -verbose option should be used:
gw-world:/> script -execute -name=my_script2.sgs -verbose
Saving Scripts
When a script file is uploaded to the NetDefend Firewall, it is initially kept only in temporary RAM
memory. If NetDefendOS restarts then any uploaded scripts will be lost from this volatile memory
and must be uploaded again to run. To store a script between restarts, it must explicitly be moved to
non-volatile NetDefendOS disk memory by using the script -store command.
To move the example my_script.sgs to non-volatile memory the command would be:
gw-world:/> script -store -name=my_script.sgs
Alternatively, all scripts can be moved to non-volatile memory with the command:
gw-world:/> script -store -all
Listing Scripts
The script on its own, command without any parameters, lists all the scripts currently available and
indicates the size of each script as well as the type of memory where it resides (residence in
non-volatile memory is indicated by the word "Disk" in the Memory column).
gw-world:/> script
Name
--------------
my_script.sgs
my_script2.sgs
To list the content of a specific uploaded script file, for example my_script.sgs the command would
be:
gw-world:/> script -show -name=my_script.sgs
Creating Scripts Automatically
When the same configuration objects needs to be copied between multiple NetDefend Firewalls,
then one way to do this with the CLI is to create a script file that creates the required objects and
then upload to and run the same script on each device.
If we already have a NetDefendOS installation that already has the objects configured that need to
be copied, then running the script -create command on that installation provides a way to
automatically create the required script file. This script file can then be downloaded to the local
management workstation and then uploaded to and executed on other NetDefend Firewalls to
duplicate the objects.
For example, suppose the requirement is to create the same set of IP4Address objects on several
NetDefend Firewalls that already exist on a single unit. The administrator would connect to the
single unit with the CLI and issue the command:
gw-world:/> script -create Address IP4Address -name new_script.sgs
Storage
Size (bytes)
------------
--------------
RAM
8
Disk
10
41
Chapter 2. Management and Maintenance

Advertisement

Table of Contents
loading

Table of Contents