D-Link DFL-1660 User Manual page 48

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

Advertisement

2.1.5. CLI Scripts
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
This creates a script file called new_script_sgs which contains all the CLI commands necessary to
create all IP4Address address objects in that unit's configuration. The created file's contents might,
for example, be:
add IP4Address If1_ip Address=10.6.60.10
add IP4Address If1_net Address=10.6.60.0/24
add IP4Address If1_br Address=10.6.60.255
add IP4Address If1_dns1 Address=141.1.1.1
The file new_script_sgs can then be downloaded with SCP to the local management workstation and
then uploaded and executed on the other NetDefend Firewalls. The end result is that all units will
have the same IP4Address objects in their address book.
Storage
------------
RAM
Disk
"
"
"
Note: Automatically created scripts omit the object category
In the created script example above, adding an IP address is done with the command:
Chapter 2. Management and Maintenance
Size (bytes)
--------------
8
10
add IP4Address...
48

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dfl-2560Dfl-2560gDfl-260eDfl-860e

Table of Contents