1fwbedit(1) Firewall Builder fwbedit(1)
2
3
4
6 fwbedit - General purpose object tree editing tool
7
9 fwbedit [-aobj,grp] [-robj,grp] [-dobj] -fdata_file.xml
10
11
12
14 fwbedit is a general purpose object tree editing tool for Firewall
15 Builder (see fwbuilder(1)). This tool can be used in the shell scripts
16 written for batch-processing of the Firewall Builder data files. Fwbe‐
17 dit can perform the following operations on the objects and the tree:
18 add a reference to the given object to a group, remove reference to an
19 object from a group and delete an object and all references to it from
20 the tree. Both object and a group can be specified by their ID or by
21 their name and a full path in the tree (see section EXAMPLES below).
22
23
25 -f FILE
26 Specify the name of the data file to be processed.
27
28
29 -a obj,grp
30 Adds reference to object 'obj' to the group 'grp'.
31
32
33 -r obj,grp
34 Removes reference to object 'obj' from the group 'grp'.
35
36
37 -d obj Deletes object 'obj' and references to it from all groups and
38 rules.
39
40
41 -V Prints version number and quit.
42
43
45 fwbedit -f x.xml -a /Objects/Hosts/A,/Objects/Groups/B
46
47 Adds reference to the Host object 'A' to the group 'B'.
48
49 fwbedit -f x.xml -a id3D71A1BA,id3D151943
50
51 Adds reference to the object with ID id3D71A1BA to the group with ID
52 id3D151943. If objects with given IDs do not exist, fwbedit prints an
53 error message and does not make any changes in the data file.
54
55 fwbedit -f x.xml -a id3D71A1BA,/Objects/Groups/testgroup
56
57 Adds reference to the object with ID id3D71A1BA to the group
58
59 fwbedit can be used in combination with fwblookup to execute operations
60 on many objects:
61
62 fwblookup -f x.xml -lP /Objects/Hosts | \
63 grep domain.com | \
64 while read h; do \
65 fwbedit -f x.xml -a $h,/Objects/Groups/domainGRP; \
66 done
67
68 first, this script uses fwblookup to print full path of all Host
69 objects (option -l in combination with option -P prints full path for
70 all children objects of /Objects/Hosts), then uses grep to filter only
71 those hosts that have 'domain.com' in their name, then cycles through
72 the obtained list and uses fwbedit to add them to the group 'domain‐
73 GRP'.
74
75
76
78 Firewall Builder home page is located at the following URL:
79 http://www.fwbuilder.org/
80
81
83 Please report bugs using bug tracking system on SourceForge:
84
85 http://sourceforge.net/tracker/?group_id=5314&atid=105314
86
87
88
90 fwbuilder(1), fwblookup(1),
91
92
93FWB fwbedit(1)