lucansky / classbench-ng

Utility for generation of firewall/OpenFlow rules
15 stars 18 forks source link

Classbench

Utility for generation of firewall/OpenFlow rules based on original (no longer maintained) Classbench.

Requirements

sudo gem install open4 ruby-ip docopt ipaddress

Installation

git clone https://github.com/lucansky/classbench-ng.git
make   # Downloads, patches and compiles db_generator in ./vendor/db_generator/db_generator

Patching classbench

Due to statically initialized arrays in ClassBench, patching is required which increases the limit. Patch is automatically applied by make in process of downloading ClassBench. (see vendor/Makefile)

Usage

./classbench analyse FILE

Analyses file, expecting FILE to be ovs-ofctl dump. Fields extracted from dump are:

Output's original Classbench seed with openflow YAML structure as last section.

./classbench generate v4 SEED [--count=100] [--db-generator=<path>]

Generates --count of OpenFlow rules. If seed without OpenFlow section is provided, regular 5-tuples are generated. Output format is "attribute=value", joined by ", ".