|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2010-5-28 10:32:13
|
显示全部楼层
dbedit官方使用范例
This procedure will create a script file to add Network objects and Network Group objects to the objects_5_0.C file.
This is ideal for environments that are not able to take advantage of GuiDBedit, or where creating a large number of objects at one time is required.
On the SmartCenter Server, close all GUI sessions, including SmartView Tracker, SmartUpdate, etc.
Create a text file containing the following lines:
create network internal_net
modify network_objects internal_net ipaddr 192.168.1.0
modify network_objects internal_net netmask 255.255.255.0
update network_objects internal_net
create host_plain web_server
modify network_objects web_server ipaddr 192.168.1.1
update network_objects web_server
create network_object_group net_group
addelement network_objects net_group '' network_objects:internal_net
addelement network_objects net_group '' network_objects:web_server
update network_objects net_group Save the edited file as: network_script.txt
Below is an explanation of what each section in the network_script.txt file does.
The following section creates a network object called "internal_net" with IP address 192.168.1.0/24:
create network internal_net
modify network_objects internal_net ipaddr 192.168.1.0
modify network_objects internal_net netmask 255.255.255.0
update network_objects internal_net
The following section creates a host object called "web_server" with IP address 192.168.1.1:
create host_plain web_server
modify network_objects web_server ipaddr 192.168.1.1
update network_objects web_server
The following section creates a network object group called "network_object_group" and adds the network object "internal_net" and host object "web_server" to this group object:
create network_object_group net_group
addelement network_objects net_group '' network_objects:internal_net
addelement network_objects net_group '' network_objects:web_server
update network_objects net_group Open a command prompt and change the current directory to the directory, in which the network_script.txt file is located.
Issue the following command to make dbedit run the script.
Note: In the following example the IP address of the SmartCenter Server is 192.168.2.100, the FireWall-1 Administrator name is "fwadmin", and the FireWall-1 Administrator password is "abc123"):
dbed |
|