fwbedit(1)

NAME
fwbedit - General purpose object tree editing tool

SYNOPSIS
fwbedit [-aobj,grp] [-robj,grp] [-dobj] -fdata_file.xml

DESCRIPTION
fwbedit is a general purpose object tree editing tool for Firewall Builder (see fwbuilder(1)). This tool can be used in the shell scripts written for batch-processing of the Firewall Builder data files. Fwbedit can perform the following operations on the objects and the tree: add a reference to the given object to a group, remove reference to an object from a group and delete an object and all references to it from the tree. Both object and a group can be specified by their ID or by their name and a full path in the tree (see section EXAMPLES below).

OPTIONS

-f FILE
    Specify the name of the data file to be processed.

-a obj,grp
    Adds reference to object 'obj' to the group 'grp'.

-r obj,grp
    Removes reference to object 'obj' from the group 'grp'.

-d obj
    Deletes object 'obj' and references to it from all groups and rules.

-V  Prints version number and quit.

EXAMPLES

fwbedit -f x.xml -a /Objects/Hosts/A,/Objects/Groups/B

Adds reference to the Host object 'A' to the group 'B'.

fwbedit -f x.xml -a id3D71A1BA,id3D151943

Adds reference to the object with ID id3D71A1BA to the group with ID id3D151943. If objects with given IDs do not exist, fwbedit prints an error message and does not make any changes in the data file.

fwbedit -f x.xml -a id3D71A1BA,/Objects/Groups/testgroup

Adds reference to the object with ID id3D71A1BA to the group

fwbedit can be used in combination with fwblookup to execute operations on many objects:

  fwblookup -f x.xml -lP /Objects/Hosts | \
  grep domain.com | \
  while read h; do \
    fwbedit -f x.xml -a $h,/Objects/Groups/domainGRP; \
  done

first, this script uses fwblookup to print full path of all Host objects (option -l in combination with option -P prints full path for all children objects of /Objects/Hosts), then uses grep to filter only those hosts that have 'domain.com' in their name, then cycles through the obtained list and uses fwbedit to add them to the group 'domainGRP'.

URL
Firewall Builder home page is located at the following URL: http://www.fwbuilder.org/

BUGS
Please report bugs using bug tracking system on SourceForge: http://sourceforge.net/tracker/?group_id=5314&atid=105314

SEE ALSO
fwbuilder(1), fwblookup(1),