Following the SMC scripting galore trend
here’s another tool for you, hoping you find it useful.
The scenario is when you need to verify/validate from command line is a given policy has issues if installed on a particular engine (but naturally without installing it).
The command sgPolicyCheck.[bat|sh] can be issued with the following parameters and options.
Parameters: Options:
host=<Mgtserver address> (default: 127.0.0.1)login=<loginname> (default: root)
pass=<password> (default: password)
cluster=<cluster name> (default: "")
policy=<policy name> (default: "")
all_clusters=<use all clusters> (default: false)
-help (Show help)
An example could be:
C:\Stonesoft\StoneGate\bin>sgPolicyCheck.bat host=192.168.1.101 login=root pass=mypass cluster=FW-5000 policy="verify-this-policy"
…and the output is similar to the one reported below:
Connect to Management Server: root@191.168.1.101
Validation of Firewall Policy verify-this-policy on Single Firewall FW-5000:
6 issues found.
6 warnings found:
2 Missing Definitions found.
Rule @2.0
Rule @3.0
2 Unreachable Rules found.
Rule @1006.0
Rule @981.0
2 NAT and Routing Definitions found.
Rule @1274.5
Rule @1157.0
As usual, Files area of StoneBlog Community contains the script for Windows and for Linux.
Leave a Reply
You must be logged in to post a comment.


Recent Comments