CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting 12/8, (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 And Related Products > SmartCenter Server (Formerly Management Server)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-07-24
Member
 
Join Date: 2007-01-19
Posts: 33
Rep Power: 0
mamakos has an average reputation (10+)
Default howto list installed policies (command or file)

Hello gentlemen, (and gentlewomen)

I am currently running NGX R60. I'd like to duplicate policies to have the latests installed renamed with a new naming convention. The thing is we have many modules (over 600 CMA thus making over 1200 fw modules) so I cannot afford using cpstat command to query each of my modules to know which policy package is installed on them. Indeed, I have a limited time and this command sometimes fails due to network latency of some other reasons.

On each CMA (i.e. like a smartcenter), we have several policy packages. But only one or two may be installed on the firewall (FW) modules managed by the CMA. I would like to retrieve the names of the policy packages that are currently installed on my modules.

With the dashboard, there is an option "File > Installed policies" that displays the policies that are installed on each FW module with this form :
FW Module | Name of the policy package | installed date
So I guess the dashboard retrieves this information from a file or built in command !

Do you, by chance, know a command (CLI) that would give me a similar output. Namely for each module, the name of the policy that is installed (again, I cannot afford to query my fw modules with cpstat).

Else do you know if there is a file that has this information ?

I need to write a script to get the list of installed policy packages...

Should you have any hint, please, feel free to share it with me !



PS : For your information, I know the audit log can give me an answer but it is not really practical to handle (it can take quite long to get the answer - 5 seconds per module are too much).
Reply With Quote
  #2 (permalink)  
Old 2007-07-31
Junior Member
 
Join Date: 2006-04-27
Posts: 14
Rep Power: 0
nandushankar has an average reputation (10+)
Default Re: howto list installed policies (command or file)

Duplication can be done from smart dashboard Select File -> Copy Policy Package and then give a new name for duplicated policy.

To check the installed policies you can run the command

fw stat from the enforcement module.
__________________
Nandu Shankar
CCSA,CCSE,CCSE+,CCMSE,RHCE,CCNA,MCP
Reply With Quote
  #3 (permalink)  
Old 2007-08-01
Member
 
Join Date: 2007-01-19
Posts: 33
Rep Power: 0
mamakos has an average reputation (10+)
Default Re: howto list installed policies (command or file)

The thing is this action must be automated.

So manual action via the dashboard is not an option. Actually to duplicate policies, the trick is to use cp_merge build in command to export a policy package and then import it with a new name.

But the question was to list policy packages that were installed on the FW modules. As I mentioned "fw stat" is not an option due to :
1) the very high number of modules we have.
2) the time it takes (between 5 and 10 seconds per fw module !)
3) the fact that it sometimes fails

The key points are :
- it must be quick
- it must be scriptable
- it must be remotely doable (from the Management center)

So for now, the only option I have found is to parse the audit logs... which is still faster than querying the fw modules with "fw stat" and then parsing the results.

Since the Dashboard gives the opportunity to see which policy is installed on each module, I would have thought it had this information hidden somewhere in a file/database. Unless it queries the modules each time we launch the application.

So any idea ?
Reply With Quote
  #4 (permalink)  
Old 2007-08-17
Junior Member
 
Join Date: 2006-06-02
Posts: 24
Rep Power: 0
rugby1725 has an average reputation (10+)
Default Re: howto list installed policies (command or file)

If you're talking about a constant monitoring type of situation on that many boxes I would look into using Nagios and building a plugin that goes on each box that runs the fw stat command. The data is then collected back on the Nagios server and displays on a web page and can generate email alerts. We currently do this to monitor the number of connections in our state tables and haven't had a problem yet.
Reply With Quote
  #5 (permalink)  
Old 2007-08-24
Member
 
Join Date: 2007-01-19
Posts: 33
Rep Power: 0
mamakos has an average reputation (10+)
Default Re: howto list installed policies (command or file)

Hi rugby.
I was not thinking of monitoring that kind of information. I "just" need it once before a migration and I need the migration to be as quick as possible so as to minimize the service interruption.

But maybe a kind of snmpwalk on a correct OID could do the job yes...

For your information, fw stat sometimes take up to 40 seconds on certain slow networks... Although this is quite an exception :)
Reply With Quote
  #6 (permalink)  
Old 2007-11-26
Junior Member
 
Join Date: 2007-11-26
Posts: 2
Rep Power: 0
jerladej has an average reputation (10+)
Default Re: howto list installed policies (command or file)

I too am searching for an answer to this question, but for R55. R62 and later now have a install_statuses.C file that is a map of the policies installed on each destination.

rulebases_5_0.fws lists all of the policies. I noticed that the R55 objects_5_0.C file has a :policies_collections() that appears to list the policies installed on each destination, but nothing listed by name is in the rulebases file.

Best regards,
Jerald
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 13:30.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0