In This Section: |
Description Generates, loads or removes the Initial Policy.
The Initial Policy offers protection to the gateway before the administrator has installed a policy on the gateway.
Syntax :
> $FWDIR/bin/comp_init_policy [-u] [-g]
Parameter |
Description |
---|---|
|
Removes the current Initial Policy and ensures that it will not be generated in future when |
|
Can be used if there is no Initial Policy. If there is, make sure that after removing the policy, you delete the Generates the Initial Policy and ensures that it will be loaded the next time a policy is fetched (at The |
Description Automatically exports administrator definitions that were created in cpconfig,
to SmartConsole.
Syntax:
> cp_admin_convert
Description Configures or reconfigures a Security Gateway installation. The configuration options for each machine depends on the installed configuration and products.
Syntax:
> cp_conf
Description Manages SIC on the Security Management Server.
Syntax:
> cp_conf sic state
> cp_conf sic init <key> [norestart]
> cp_conf sic cert_pull <management> <object>
Parameter |
Description |
---|---|
|
Shows the SIC trust state. |
|
Restarts SIC with the Activation Key <key>. |
|
By default, the Security Gateway runs |
|
For DAIP Security Gateways, pulls a certificate from the Security Management Server for the |
<management> |
Name or IP address of the Security Management Server. |
Description Manages Check Point system administrators for the Security Management Server
Syntax:
> cp_conf admin get # Get the list of administrators.
> cp_conf admin add <user> <pass> {a|w|r}
> cp_conf admin del <admin1> <admin2>...
Parameter |
Description |
---|---|
|
Shows a list of the administrators. |
|
Adds a new administrator <user> with password <pass>. |
|
Sets the permissions for the new administrator:
|
|
Deletes one or more administrators <admin1>, <admin2>, and so on. |
Description Initializes the Certificate Authority
Syntax:
> cp_conf ca init
> cp_conf ca fqdn <name>
Parameter |
Description |
---|---|
|
Initializes the internal CA. |
|
Sets the FQDN of the internal CA to |
Description Displays the fingerprint which will be used on first-time launch. This verifies the identity of the Security Management Server being accessed by SmartConsole. This fingerprint is a text string derived from the Security Management Server certificate.
Syntax:
> cp_conf finger get
Description Shows the installed licenses and lets you manually add new ones.
Syntax:
> cp_conf lic get
> cp_conf lic add -f <file>
> cp_conf lic add -m <Host> <Date> <Key> <SKU>
> cp_conf lic del <Signature Key>
Parameter |
Description |
---|---|
|
Shows the installed licenses. |
|
Adds the license from |
|
Manually adds a license with these parameters:
|
|
Deletes license |
Description Manages the GUI clients that can use SmartConsoles to connect to the Security Management Server.
Syntax:
> cp_conf client get # Get the GUI clients list
> cp_conf client add <
GUI client> # Add one GUI Client
> cp_conf client del <
GUI client 1> <
GUI client 2>... # Delete GUI Clients
> cp_conf client createlist <
GUI client 1> <
GUI client 2>... # Create new list.
Parameter |
Description |
---|---|
|
Shows the IP addresses of the allowed GUI clients. |
|
Adds the |
|
Deletes one or more IP addresses from the list of allowed GUI clients. |
|
Deletes allowed GUI clients and creates a new list. The new list allows |
Description Enables or disables High Availability.
Syntax:
> cp_conf ha {enable|disable} [norestart]
Description Activates or deactivates SNMP.
Syntax:
> cp_conf snmp get # Get SNMP Extension status.
> cp_conf snmp {activate|deactivate} [norestart] # Deactivate SNMP Extension.
Parameter |
Description |
---|---|
|
Shows the SNMP status. |
|
Enables or disables SNMP. |
|
By default, the Security Gateway runs |
Description Configures the Security Gateway and Security Management Server products that start automatically when the appliance or server reboots.
Syntax
> cp_conf auto get [fw1] [fg1] [rm] [all]
> cp_conf auto {enable|disable} <
product1> <
product2>...
Parameter |
Description |
---|---|
|
Shows which products start automatically |
|
Enables or disables the one or more products that start automatically |
Description Enables or disables SecureXL acceleration.
Syntax:
> cp_conf sxl {enable|disable}
Description Run a command line version of the Check Point configuration tool. This tool is used to configure an installed Check Point product. The options shown depend on the installed configuration and products and include:
Syntax
> cpconfig
Description An auto-updatable utility that collects diagnostics data on a customer's machine at the time of execution, and uploads it to Check Point servers. The CPinfo
output file enables Check Point support engineers to analyze setups from a remote location. Engineers can open the CPinfo
file in demo mode, while viewing real security policies and objects. This allows for in-depth analysis of all of configuration options and environment settings.
Syntax:
> cpinfo [-v] [-l] [-n] [-o ] [-r | -t [tablename]] [-c <
domain> ... | -x <
vs>]
Parameter |
Description |
|
---|---|---|
|
Connect to Check Point User Center with specified password |
Used in combination with The password must be provided in the obscured format |
|
Upload the files to the specified folder on the Check Point server. Instead of a regular folder used by the |
Example:
Regular folder:
http://ftp-monitor.checkpoint.com/CPUploaderInfoPage/CPUploaderInfo Running the "cpinfo -r CP-SmartConsole-UI ..." command will upload the file to: http://ftp-win.checkpoint.com/cpuploaderverified/CP-SmartConsole-UI/
Running the "cpinfo -r R80_desk ..." command will upload the file to: http://ftp-win.checkpoint.com/cpuploaderverified/R80_desk/ |
|
Iinternal flag which will mark the relaunch of a newly updated version and will be added automatically, instead of flag |
This flag is available from build 914000158 This flag will prevent the combination of "-a" and "-d" flags and allow CPInfo execution to continue (instead of exiting with the following error message: "Force update check mode (-a flag) cannot be used in combination with don't check for updates mode (-d flag) or with non-interactive mode ("-i" flag).") Refer to CR02328835 |
|
Connect to the Check Point User Center with a specified username |
cannot be used with –i flag but without –p flag (which is internal). So actually –u cannot be used in combination with –i. |
|
|
The output is a small xml with few but important details needed for the SR creation process. It is used From SmartConsole, right-click Gateway / Management -> actions -> support -> new service request. |
For more information, see sk92739.
Description cplic
all its derivatives relate to Check Point license management.
All cplic
commands are located in $CPDIR/bin.
License Management is divided into three types of commands:
Description
Confirms that the license includes the feature on the local gateway or Security Management Server.
Syntax
cplic check [-p <
product>] [-v <
version>] [-c|-count] [-t <
date>] [-r|-routers] [-S|-SRusers] <
feature>
Parameter |
Description |
---|---|
|
Product, for which license information is requested. For example, |
|
Product version, for which license information is requested. |
|
Outputs the number of licenses connected to this feature. |
|
Checks license status on future date. Use the format ddmmmyyyy. A feature can be valid on a given date on one license, but invalid on another. |
|
Checks how many routers are allowed. The |
|
Checks how many SecuRemote users are allowed. |
|
|
Description
Deletes a single Check Point license on a host, including unwanted evaluation, expired, and other licenses. Used for both local and remote machines
Syntax
cplic del [-F <
output file>] <
signature> <
object name>
Parameter |
Description |
---|---|
|
Sends the output to <output file |
|
The signature string within the license. |
Description
Retrieves all licenses from Security Gateways into the license repository on the Security Management Server. This command helps to synchronize the repository with the Check Point Security Gateways. When the command is run, all local changes are updated.
Syntax
cplic get {<
ipaddr>|<
hostname>|-all} [-v41]
Parameter |
Description |
---|---|
|
The IP address of the Check Point Security Gateway, from which licenses are to be retrieved. |
|
The name of the Check Point Security Gateway object as defined in SmartConsole, from which licenses are to be retrieved. |
|
Retrieves licenses from all Check Point gateways in the managed network. |
- |
Retrieves version 4.1 licenses from the NF Check Point gateway. Used to upgrade version 4.1 licenses. |
Example
If the Check Point Security Gateway with the object name caruso
contains four Local licenses, and the license repository contains two other Local licenses, the command cplic get caruso
produces output similar to this:
Get retrieved 4 licenses.
Get removed 2 licenses.
Note - This is a Remote Licensing Command, which affects remote machines. It is executed on the Security Management Server.
Description
The cplic print
command, located in $CPDIR/bin,
prints details of Check Point licenses on the local machine.
Syntax
cplic print [-n|-noheader][-x prints signatures][-t type][-F <
outputfile>] [‑p preatures]
Parameter |
Description |
---|---|
|
Prints licenses with no header. |
|
Prints licenses with their signature. |
|
Prints licenses showing their type: Central or Local. |
|
Diverts the output to |
|
Prints licenses resolved to primitive features. |
Note - On a Check Point gateway, this command prints all licenses that are installed on the local machine, both local and central licenses.
Description
Installs one or more local licenses on a local machine.
Syntax
cplic put [-o|-overwrite] [-c|-check-only] [-s|-select] [-F <
output file>] [-P|-Pre-boot] [-k|-kernel-only] -l <
license-file> [<host>] [<
expiration date>] [<
signature>] [<
SKU/feature>]
Parameter |
Description |
---|---|
|
On a Security Management Server this erases all existing licenses and replaces them with the new licenses. On a Check Point Security Gateway this erases only the local licenses, but not central licenses that are installed remotely. |
|
Verifies the license. Checks if the IP of the license matches the machine and if the signature is valid. |
|
Selects only the local license whose IP address matches the IP address of the machine. |
|
Outputs the result of the command to the designated file rather than to the screen. |
|
Use this option after you have upgraded and before you reboot the machine. Use of this option will prevent certain error messages. |
|
Pushes the current valid licenses to the kernel. For support use only. |
|
Name of the file that contains the license. |
|
Security Management Server hostname or IP address. |
|
The license expiration date |
|
The license signature string. For example: |
|
The SKU of the license summarizes the features included in the license. For example: |
Note - Copy and paste the parameters from the license received from the User Center.
host
- One of these:hostid
command (beginning with 0x
).expiration date
- The license expiration date. It can be never
signature
- The license signature string. For example: aa6uwknDc-CE6CRtjhv-zipoVWSnm-z98N7Ck3m
(Case sensitive. The hyphens are optional.)
SKU/features -
A string listing the SKU and the Certificate Key of the license. The SKU of the license summarizes the features included in the license.
For example: CPSB-SWB CPSB-ADNC-M CK0123456789ab
Example
cplic put -l License.lic
produces output similar to this:
Host Expiration SKU 192.168.2.3 14Jan2016 CPSB-SWB CPSB-ADNC-M CK0123456789ab |
Description cp_merge
utility has two main functionalities:
Syntax :
> cp_merge help
Parameter |
Description |
---|---|
|
Displays the usage for |
Description Gives the option to delete an existing policy package. Note that the default policy can be deleted by delete action.
Syntax :
> cp_merge delete_policy [-s <
db server>] [-u <
user> | -c <
certificate file>] [-p <
password>] -n <
package name>
Parameter |
Description |
---|---|
|
Specifies the database server IP Address or DNS name.2 |
|
The administrator's name. 1,2 |
|
The path to the certificate file. 1 |
|
The administrator's password. 1 |
|
The policy package to export. 2,3 |
Note - Further considerations:
Example: Delete the policy package called standard
> cp_merge delete_policy -n Standard
Description Gives the option of leaving the policy package in the active repository or delete it as part of the export process. The default policy cannot be deleted during the export action.
Syntax :
> cp_merge export_policy [-s <
db server>] [-u <
user> | -c <
certificate file>] [-p <
password>] [-n <
policy package name> | -l <
policy name>] [-d <
output directory>] [-f <
outputfile>] [-r]
Parameter |
Description |
---|---|
-s <db server> |
Specifies the database server IP Address or DNS name. 2 |
-u <user> |
The database administrator's name. 1 |
-c <certificate file> |
The path to the certificate file. 1 |
-p <password> |
The administrator's password. 1 |
-n <policy package name> |
The policy package to export. 2,3 |
-l <policy name> |
Exports the policy package which encloses the policy name. 2,3,4 |
-d <output directory> |
Specifies the output directory. 2 |
-f <outputfile> |
Specifies the output file name (where the default file name is |
-r |
Removes the original policy from the repository. 2 |
Note - Further considerations:
1. Either use certificate file or user and password.
2. Optional.
3. If both -n
and -l
are omitted all policy packages are exported.
4. If both -n
and -l
are present -l
is ignored.
Example: Export policy package standard to file:
> cp_merge export_policy -n Standard -f StandardPolicyPackageBackup.pol -d C:\bak
Description Gives the option to overwrite an existing policy package with the same name, or prevent overwriting when the same policy name already exists.
Syntax :
> cp_merge import_policy|restore_policy [-s <
db server>] [-u <
user> | -c <
certificate file>] [-p <
password>] [-n <
package name>] [-d <
input directory>] -f <
input file> [-v]
Parameter |
Description |
---|---|
|
Specifies the database server IP address or DNS name. 2 |
|
The administrator's name. 1,2 |
|
The path to the certificate file. 1 |
|
The administrator's password. 1,2 |
|
Renames the policy package to <package name> when importing. 2 |
|
Specifies the input directory. 2 |
|
Specifies the input file name. |
|
Overrides an existing policy if found. 2 |
Note - Further considerations
1. Either use certificate file or user and password.
2. Optional.
The cp_mergerestore_policy
works only locally on the Security Management Server and it will not work from remote machines.
Caution: A security policy from <
policy>.W
file can be restored using this utility; however, important information may be lost when the policy is translated into .W
format. This restoration should be used only if there is no other backup of the policy.
Example: Import the policy package saved in file Standard.pol
into the repository and rename it to StandardCopy
> cp_merge import_policy -f Standard.pol -n StandardCopy
Syntax
cp_merge list_policy [-s <
db server>] [-u <
user> | -c <
certificate file>] [-p <
password>]
Parameter |
Description |
---|---|
|
Specify the database server IP Address or DNS name.2 |
|
The administrator's name.1,2 |
|
The path to the certificate file.1,2 |
|
The administrator's password.1,2 |
Note - Further considerations:
Example: List all policy packages which reside in the specified repository:
> cp_merge list_policy -s localhost
SmartConsole can connect to a Security Management Server using one of these modes:
Only one administrator can use SmartConsole to connect to a Security Management Server in the Read/Write Mode at one time. When an administrator connects in the Read/Write Mode, this prevents other administrators from doing these actions:
You can use a special command line utility to disconnect a different SmartConsole client that is open in the Read/Write Mode.
To remove the database lock, run disconnect_client
from the Security Management Server command line.
For more information, see sk65146
Description The dbver
utility is used to export and import different revisions of the database. The properties of the revisions (last time created, administrator responsible for, etc) can be reviewed. The utility can be found in $FWDIR/bin
. Run these commands from Expert Mode.
Syntax
dbver> export <
version_numbers> <
delete|keep>
dbver> import <
exported_version_in_server>
dbver> create <
version_name> <
version_comment>
dbver> delete <
version_numbers>
dbver> print <
version_file_path>
dbver> print_all
Description Creates a revision from the current state of $FWDIR/conf,
including current objects, Rule Bases, and so on.
Syntax
dbver> create <
version_name> <
version_comment>
Parameter |
Description |
---|---|
|
The name of the revision |
|
Append a comment to the revision |
Description Archives the revision as an archive file in the revisions repository: $FWDIR/conf/db_versions/export
Syntax
dbver> export <
version_numbers> <
delete|keep>
Parameter |
Description |
---|---|
|
The file name of the exported version. |
|
|
Description Adds an exported revision to the repository a version from $FWDIR/conf/db_versions/export
. Gives filename of revision as input.
Syntax
dbver> import <
exported_version_in_server>
Parameter |
Description |
---|---|
|
The file name of the exported version. |
Description Prints the properties of the revision.
Syntax
dbver> print <
version_file_path>
Parameter |
Description |
---|---|
|
The full name and path on the local machine of the revision. |
Output
|
Description Prints the properties of all revisions to be found on the server side: $FWDIR/conf/db_versions
Syntax
dbver> print_all
Description The fw
commands are used for working with various aspects of the firewall. All fw
commands are executed on the Check Point Security Gateway.
Typing fw
at the command prompt sends a list of available fw commands to the standard output.
Syntax
> fw
Description Generally, when Check Point Security Gateway commands are executed on a Security Gateway they will relate to the gateway as a whole, rather than to an individual kernel instance. For example, the fw tab
command will enable viewing or editing of a single table of information aggregated for all kernel instances.
This command specifies that certain commands apply to an individual kernel instance. By adding -i <kern>
after fw
in the command, where <
kern>
is the CoreXL FW instance's number.
Syntax
> fw -i
applies to the following commands:
> fw ctl debug
(when used without the -buf
parameter)
> fw ctl get
> fw ctl set
> fw ctl leak
> fw ctl pstat
> fw monitor
> fw tab
For details and additional parameters for any of these commands, refer to the command's entry.
Example To view the connections table for kernel instance #1 use the following command:
> fw -i 1 tab -t connections
Description Sets CoreXL affinities when using multiple processors. For an explanation of kernel, daemon and interface affinities, see the R80.10 Rerformance Tuning Administration Guide.
fw ctl affinity -s
settings are not persistent through a restart of the Security Gateway. If you want the settings to be persistent, use:
sim affinity
(a Performance Pack command) OR
fwaffinity.conf
configuration file To set interface affinities, you should use fw ctl affinity
only if Performance Pack is not running. If Performance Pack is running, you should set affinities by using the Performance Pack sim affinity
command. These settings will be persistent. If Performance Pack's sim affinity
is set to Automatic mode (even if Performance Pack was subsequently disabled), you will not be able to set interface affinities by using fw ctl affinity -s
Note - The fw ctl affinity
command is different for a VSX Gateway and a Security Gateway.
For the VSX Gateway, use the -d
parameter to save the CoreXL affinity settings after you reboot
For the Security Gateway, the CoreXL affinity settings are not saved after reboot.
Syntax
> fw ctl affinity -s <
proc_selection> <
cpuid>
<
proc_selection>
is one of the following parameters:
Parameter |
Description |
---|---|
|
Sets affinity for a particular process, where |
|
Sets affinity for a Check Point daemon, where |
|
Sets affinity for a kernel instance, where |
|
Sets affinity for an interface, where |
<
cpuid>
should be a processing core number or a list of processing core numbers. To have no affinity to any specific processing core, <
cpuid>
should be all
Note - Setting an Interface Affinity will set the affinities of all interfaces sharing the same IRQ to the same processing core. To view the IRQs of all interfaces, run: fw ctl affinity -l -v -a
Example To set kernel instance #3 to run on processing core #5, run:
> fw ctl affinity -s -k 3 5
Description Lists existing CoreXL affinities when Security Gateway uses multiple CPU processors. For an explanation of kernel, daemon and interface affinities, see the R80.10 Rerformance Tuning Administration Guide.
Syntax
> fw ctl affinity -l [<
proc_selection>] [<
listtype>]
If <
proc_selection>
is omitted, fw ctl affinity -l
lists affinities of all Check Point daemons, CoreXL FW instances and interfaces. Otherwise, <
proc_selection>
is one of the following parameters:
Parameter |
Description |
---|---|
|
Displays the affinity of a particular process, where |
|
Displays the affinity of a Check Point daemon, where |
|
Displays the affinity of a kernel instance, where |
|
Displays the affinity of an interface, where |
If <
listtype>
is omitted, fw ctl affinity -l
lists items with specific affinities, and their affinities. Otherwise, <
listtype>
is one or more of the following parameters:
Parameter |
Description |
---|---|
|
All - includes items without specific affinities. |
|
Reverse - lists each processing core and the items that have it as their affinity. |
|
Verbose - list includes additional information. |
Example:
To list complete affinity information for all Check Point daemons, kernel instances and interfaces, including items without specific affinities, and with additional information, run: > fw ctl affinity -l -a -v
Description Generates debug messages from Check Point Firewall kernel to a buffer.
Syntax A number of debug options are available:
fw ctl debug -buf [buffer size]
fw ctl debug [-m <
module>] [+ | -] {options|all|0}
fw ctl debug 0
fw ctl debug [-d <
comma separated list of strings>]
fw ctl debug [-d <
comma separated list of ^strings>]
fw ctl debug [-s <
string>]
fw ctl debug -h
fw ctl debug -x
Parameter |
Description |
---|---|
|
Allocates a buffer of size kilobytes (default 128) and starts collecting messages there. If the |
|
Specifies the Security Gateway module you wish to debug. The default module is For example: |
|
Sets or resets debug flags for the requested gateway.
|
|
Prints a list of debug modules and flags. |
|
Returns all flags in all gateways to their default values, releases the debug buffer (if there was one). |
|
Only lines containing these strings are included in the output (Available in R70 or higher) |
|
Lines containing these strings are omitted from the output (Available in R70 or higher) For example:
Output shows only lines containing the words |
|
Stops debug messages when a certain string is issues (Available in R70 or higher) For example: |
|
Shuts down the debug. |
For more information, see R80.10 Kernel Debug flags.
Description Enables the INSPECT2C engine, which dynamically converts INSPECT code to C code.
Run the command on the Check Point Security Gateway.
Syntax
> fw ctl engine {on | off | stat | setdefault}
Parameter |
Description |
---|---|
|
Compiles the engine if necessary, and activate it. Because the engine may not have been previously compiled, turning the engine ON may not activate it immediately. Instead, the engine is activated in the background after the compilation. After turning the engine ON, the engine recompiles and reactivates itself every policy installation regardless of the values of |
|
Deactivates the engine if it is active. Subsequent policy installation on the gateway does NOT auto-activate the engine unless the command is used again. |
|
Prints the status of the engine. For example, During compilation, Before auto-activation, and Deactivated. |
|
Restores control to database settings. Security Management Server settings are ignored. At the next policy installation, return the control of the engine to the values of the following gateway database attributes:
Use |
Description Displays multi-kernel statistics for each kernel instance. The state and processing core number of each instance is displayed, along with:
Description The IPS performance counters measure the percentage of CPU consumed by each IPS protection.
The measurement itself is divided according to the type of protection:
In addition, the IPS counters measure the percentage of CPU used by each section (context) of the protocol, and each protocol parser.
For more information, see sk43733 How to measure CPU time consumed by IPS protections.
Syntax
> fw ctl zdebug >& outputfile
> fw ctl sdstat start
> fw ctl sdstat stop
Parameter |
Description |
---|---|
|
Turns on debug Mode and specify an output file. |
|
Activates the IPS counters. |
|
Prints a report and stops the counters. |
Example:
The workflow is as follows. Run the following commands on the Check Point Gateway (version R70 or higher):
On the Check Point Security Gateway:
fw ctl zdebug >& outputfile
fw ctl sdstat start
Let the counters run. However, do not leave the counters on for more than 10 minutes. It is important to stop the counters explicitly, otherwise there may be performance penalty.
Run fw ctl sdstat stop
This generates the output file outputfile
that must be processed on the (SecurePlatform only) Security Management Server.
On the Security Management Server:
From $FWDIR/script
, run the script /sdstat_analyse.csh outputfile
The output of the script is a report in csv format that can be viewed in Microsoft Excel.
If there is a problem in the report, or if more details are needed, a debug flag is available which prints extra information to outputfile
Run fw ctl zdebug + spii >& outputfile
Example Debug Message |
Explanation |
---|---|
|
User tried to create a report without initializing the counters, or an error occurred during initialization and the user then tried to print a report. |
|
The measurement process failed and the total time units for IPS is zero. |
Comments
sdstat_analyse
script may contain a number instead of a protection name. This is because the original output contains a signature id, but the id is missing from the Security Policy on the gateway.Description Takes down (or up) a redundant <tp_isp> link.
Syntax
> fw isp_link [<
target>] <
link-name> {up|down}
Parameter |
Description |
---|---|
|
The name of the Check Point Security Gateway. |
|
The name of the <tp_isp> link as defined in the <tp_isp>-redundancy tab. |
Note - This command can be executed locally on the Check Point Security Gateway or remotely from the Security Management Server. In the latter case, the target argument must be supplied. For this command to work, the Check Point Security Gateway should be using the <tp_isp> redundancy feature.
Description Prompts the kernel to shut down all firewall daemon processes. The command is located in the $FWDIR/bin directory
on the Security Management Server or gateway machine.
The firewall daemons and Security Servers write their pids
to files in the $FWDIR/tmp directory
upon startup. These files are named $FWDIR/tmp/daemon_name.pid
.
For example, the file containing the pid
of the firewall snmp
daemon is: s$FWDIR/tmp/snmpd.pid
.
Syntax
> fw kill [-t <
sig_no>] <
proc-name>
Parameter |
Description |
---|---|
|
This Unix only command specifies that if the file If no signal is specified, signal 15 ( |
|
Prompts the kernel to shut down specified firewall daemon processes. |
Note - In Windows, only the default syntax is supported fw kill proc_name.
If the -t
option is used it is ignored.
Description
Creates a new active log file. The current active log file is closed and renamed by default $FWDIR/log/<
current_time_stamp>.log
unless you define an alternative name that is unique. The format of the default name <current_time_stamp>.log
is YYYY-MM-DD_HHMMSS.log.
For example, 2003-03-26_041200.log
Warning:
$FWDIR/log/current_time_stamp.log
The new log file that is created is given the default name $FWDIR/log/fw.log
. Old log files are located in the same directory.
A Security Management Server can use fw logswitch
to change a log file on a remote machine and transfer the log file to the Security Management Server. This same operation can be performed for a remote machine using fw lslogs
and fw fetchlogs
When a log file is sent to the Security Management Server, the data is compressed.
Syntax
> fw logswitch [-audit] [<
filename>]
> fw logswitch -h <
hostage> [+|-][<
filename>]
Parameter |
Description |
---|---|
|
Logswitch for the Security Management Server audit file is done. This is relevant for local activation. |
|
The name of the file to which the log is saved. If no name is specified, a default name is provided. |
|
The resolvable name or IP address of the remote machine (running either a Security Gateway or <to_sms>) on which the log file is located. The Security Management Server (on which the |
|
Change a remote log and copy it to the local machine. |
|
Change a remote log and move it to the local machine thereby deleting the log from the remote machine. |
Note - Files are created in the $FWDIR/log
directory on both the host
and the Security Management Server when the +
or -
parameters are specified. Note that if -
is specified, the log file on the host is deleted rather than renamed.
hostage
specified:
filename
specified - On hostage
, the old log file is renamed to old_log
. On the Security Management Server, the copied file will have the same name, prefixed by hostages
name. For example, the command fw logswitch -h venus +xyz
creates a file named venus_xyz.log
on the Security Management Server.filename
not specified - On hostage
, the new name is the current date. For example, 2003-03-26_041200.log
.
On the Security Management Server, the copied file will have the same name, but prefixed by hostage_
. For example, target
_2003-03-26_041200.log
.
hostage
not specified:
filename
specified - On the Security Management Server, the old log file is renamed to old_log
filename
not specified - On the Security Management Server, the old log file is renamed to the current date.Compression
When log files are transmitted from one machine to another, they are compressed using the zlib
package, a standard package used in the Unix gzip
command (see RFC 1950 to RFC 1952 for details). The algorithm is a variation of LZ77 method.
The compression ratio varies with the content of the log records and is difficult to predict. Binary data are not compressed, but string data such as user names and URLs are compressed.
Description Displays a list of log files residing on a remote or local machine. You must initialize SIC between the Security Management Server and the remote machine.
Syntax
> fw lslogs [[-f <
filename>] ...] [-e] [-s {<
name>|<
size>|<
stime>|<
etime>}] [-r] [<
machine>]
Parameter |
Description |
---|---|
|
The list of files to be displayed. The file name can include wildcards. In Unix, any file containing wildcards should be enclosed in quotes. The default parameter is |
|
Display an extended file list. It includes the following data:
|
|
Specifies the sort order of the log files using one of the following sort options:
The default is |
|
Reverses the sort order (descending order). |
|
The name of the machine on which the files are located. It can be a gateway or a Log Server. The default is |
Example:
This example shows the extended file list you see when you use the fw lslogs -e
command.
> fw lslogs -e module3 Size Creation Time Closing Time Log file name 99KB 10Jan2002 16:46:27 10Jan2002 18:36:05 2002-01-10_183752.log 16KB 10Jan2002 18:36:05 -- fw.log |
Description Inspecting network traffic is an essential part of troubleshooting network deployments. fw monitor
is a powerful built-in tool to simplify the task of capturing network packets at multiple capture points within the firewall chain. These packets can be inspected using industry-standard tools later on.
In many deployment and support scenarios capturing network packets is an essential functionality. tcpdump
or snoop
are tools normally used for this task. Check Point fw monitor
provides an even better functionality, but omits many requirements and risks of these tools. For more information, see sk30583.
tcpdump
and snoop
are normally used with network interface cards in Promiscuous Mode. Unfortunately the Promiscuous Mode allows remote attacks against these tools. fw monitor
does not use the Promiscuous Mode to capture packets. In addition most firewall operating systems are hardened. In most cases this hardening includes the removal of tools like tcpdump
or snoop
because of their security risk.fw monitor
is a built-in firewall tool, which does not need separate installation in case you need to capture packets. It is a functionality provided with the installation of the firewall package.fw monitor
allows you to capture packets at multiple capture positions within the firewall kernel module chain, both for inbound and outbound packets. This enables you to trace a packet through the different functionalities of the firewall.fw monitor
on different platforms. Tools like snoop
or tcpdump
are often platform dependent or have specific enhancements on certain platforms. fw monitor
and all its related functionality and syntax is absolutely identical across all platforms. There is no need to learn any new tricks on an unknown platform.Normally the Check Point kernel modules are used to perform several functions on packets (like filtering, encrypting and decrypting, QoS …). fw monitor
adds its own modules to capture packets. Therefore fw monitor
can capture all packets which are seen and/or forwarded by the firewall.
Only one instance of fw monitor
can be run at a time.
Use CTRL + C to stop fw monitor
.
Usage fw monitor [-u|s] [-i] [-d] [-D] <{-e expr}+|-f <
filter-file|->> [-l len] [-m mask] [-x offset[,len]] [-o <
file>] <
[-pi pos] [-pI pos] [-po pos] [-pO pos] | -p all > [-a] [-ci count] [-co count] [-h] -T
Syntax
Parameter |
Description |
---|---|
|
Printing the UUID or the SUUID: The option |
|
Flushing the standard output: Use to make sure that captured data for each packet is at once written to standard output. This is especially useful if you want to kill a running fw monitor process and want to be sure that all data is written to a file. |
|
Debugging |
|
Filtering fw monitor packets:
|
|
Limiting the packet length: |
|
Setting capture masks: By default |
|
Printing packet/payload data: In addition to the IP and Transport header, |
|
Write output to file: Save the raw packet data to a file in a standard (RFC 1761) format. The file can be examined using by tools like Note - The |
|
Prints time stamp in microseconds. |
|
Insert fw monitor chain module at a specific position: In addition to capture masks (which give the ability to look at packets in a specific position) |
|
Use absolute chain positions: If you use |
|
Capture a specific number of packets: |
|
Displays the usage. |
Example:
The easiest way to use fw monitor
is to invoke it without any parameter. This will output every packet from every interface that passes (or at least reaches) the Check Point Security Gateway. The same packet appears several times (two times in the example below). This is caused by fw monitor
capturing the packets at different capture points.
Output:
cpmodule]# fw monitor monitor: getting filter (from command line) monitor: compiling monitorfilter: Compiled OK. monitor: loading monitor: monitoring (control-C to stop) eth0:i[285]: 192.0.2.133 -> 192.0.2.2 (TCP) len=285 id=1075 TCP: 1050 -> 18190 ...PA. seq=bf8bc98e ack=941b05bc eth0:I[285]: 192.0.2.133 -> 192.0.2.2 (TCP) len=285 id=1075 TCP: 1050 -> 18190 ...PA. seq=bf8bc98e ack=941b05bc eth0:o[197]: 192.0.2.2 -> 192.0.2.133 (TCP) len=197 id=44599 TCP: 18190 -> 1050 ...PA. seq=941b05bc ack=bf8bca83 eth0:O[197]: 192.0.2.2 -> 192.0.2.133 (TCP) len=197 id=44599 TCP: 18190 -> 1050 ...PA. seq=941b05bc ack=bf8bca83 eth0:o[1500]: 192.0.2.2 -> 192.0.2.133 (TCP) len=1500 id=44600 TCP ^C : 18190 -> 1050 ....A. seq=941b0659 ack=bf8bca83 monitor: caught sig 2 monitor: unloading |
The first line of the fw monitor
output is:
|
This packet was captured on the first network interface (eth0
) in inbound direction before the virtual machine (lowercase i). The packet length is 285 bytes (in square parenthesis, repeated at the end of the line. Note that these two values may be different. The packets ID is 1075. The packet was sent from 192.0.2.133 to 192.0.2.2 and carries a TCP header/payload.
The second line of the fw monitor
output is:
|
The second line tells us that this is a TCP payload inside the IP packet which was sent from port 1050 to port 18190. The following element displays the TCP flags set (in this case PUSH and ACK). The last two elements are showing the sequence number (seq=bf8bc98e) of the TCP packet and the acknowledged sequence number (ack=941b05bc). You will see similar information for UDP packets.
You will only see a second line if the transport protocol used is known to fw monitor
. Known protocols are for example TCP, UDP and ICMP. If the transport protocol is unknown or cannot be analyzed because it is encrypted (for example, ESP or encapsulated (GRE)) the second line is missing.
For more information, see sk30583.
Description Use these expressions to help when you are filtering fw monitor
Syntax > fw monitor -e "accept <
expression>;"
Expressions for Protocols
Expression |
Description |
---|---|
|
TCP |
|
UDP |
|
ICMP v4 |
|
ICMP v6 |
|
ESP |
Expressions for Services
Expression |
Description |
---|---|
|
HTTP (TCP port 80) |
|
HTTPS (TCP port 443) |
|
FTP (TCP port 20 or 21) |
|
SSH (TCP port 22) |
|
TELNET (TCP port 23) |
|
SMTP (TCP Port 25) |
|
POP3 (TCP port 110) |
|
DNS (TCP / UDP port 53 |
|
HTTP (TCP port 8080) |
Expressions for VPN
For more information, see sk52421.
Expression |
Description |
Check Point Description |
---|---|---|
|
IKE (UDP port 500) |
|
|
NAT-T (UDP port 4500) |
|
|
UDP encapsulation (UDP port 2746) |
Check Point SecuRemote IPsec Transport Encapsulation Protocol |
|
Check Point RDP (UDP port 259) |
Proprietary Check Point Reliable Data Protocol (does not comply with RDP as specified in RFC 908/RFC 1151) |
|
Check Point Security Gateway SecuRemote Topology Requests (TCP port 264) |
Topology Download from Security Gateway (by FWD daemon) to SecuRemote (build 4100 and higher) and SecureClient |
|
L2TP (TCP port 1701) |
|
|
Check Point Tunnel Testing (UDP port 18234) |
Check Point tunnel testing application - Testing ICA through VPN by SecuRemote / SecureClient |
Expressions for ICA (Internal Certificate Authority)
For more information, see sk52421.
Expression |
Description |
Check Point Description |
---|---|---|
|
Check Point Internal CA Pull Certificate Service (TCP port 18210) |
Pulling certificates by Security Gateway from Security Management Server (by CPCA daemon) |
|
Check Point Internal CA Push Certificate Service (TCP port 18211) |
Pushing certificates from the Internal Certificate Authority (ICA) on Security Management Server (by CPD daemon) to Security Gateway |
|
Check Point Internal CA Fetch CRL and User Registration Services (TCP port 18264) |
Protocol for Certificate Revocation Lists and registering users when using the Policy Server (needed when, for example, Security Gateway is starting). See sk35292. |
|
Check Point Internal CA Management Tools (TCP port 18265) |
|
Expressions for Security Management Server
Expression |
Description |
---|---|
|
Port 18190 (SmartConsole) |
|
Port 18191 (Install policy) |
|
Port 18192 (AMON server) |
|
Port 18231 |
|
Port 18233 (Client SCV) |
Expressions for Common Tasks
Expression |
Description |
---|---|
|
Uses these expressions: |
|
Uses these expressions: |
|
Uses these expressions: |
|
Uses expressions for standard site to site: |
|
Uses expressions for remote access: |
|
Uses expressions for multi-portal: |
|
Uses expressions for all VPN services: |
|
Uses expressions for VPN and common test services: |
Expressions to Exclude Background Traffic
Expression |
Description |
---|---|
|
Uses expressions to exclude remote terminal: |
|
Uses expressions to exclude Check Point management services: |
Example: > fwmonitor -e "accept https;"
Description
Rebuilds a log file pointer files. The three files: name.logptr
, name.loginitial_ptr
and name.logaccount_ptr
are recreated from data in the specified log file. The log file itself is modified only if the -u
flag is specified.
Syntax
fw repairlog [-u] <
logfile>
Parameter |
Description |
---|---|
|
Indicates that the unification chains in the log file should be rebuilt. |
|
The name of the log file to repair. |
Description Use fw stat
to view the policy installed on the gateway, and which interfaces are being protected.
Note - The cpstat
command is an enhanced version of fw stat
Syntax
> fw stat -l
> fw stat -s
Parameter |
Description |
---|---|
|
Shows a long, detailed listing of the installed policies. |
|
Shows a short summary of the installed policies. |
Examples:
Two interfaces are being protected. The arrows show the direction of the packets.
HOST POLICY DATE localhost Standard 18Apr2012 15:01:51 : [>eth0] [<eth0] |
This shows that there is no policy installed, and the interfaces are not protected. After the policy is uninstalled, the output becomes:
HOST POLICY DATE localhost - - : >eth0 <eth0 |
Description Shows data from the kernel tables, and lets you change the content of dynamic kernel tables. You cannot change the content of static kernel tables.
Kernel tables (also known as State tables) store data that the Firewall and other modules in the Security Gateway use to inspect packets. These kernel tables are the memory of the virtual computer in the kernel and are a critical component of Stateful Inspection. The kernel tables are dynamic hash tables in the kernel memories.
Syntax
fw tab [-t <
table>] [-s] [-c] [-f] [-o <
filename>] [-r] [-u | -m <
maxval>] [{-a|-x} -e <
entry>] [-y] [<
hostname>]
Parameter |
Description |
---|---|
|
Specifies a table for the command. |
|
Shows a short summary of the table data. |
|
Shows formatted table information in common format. |
|
Shows a formatted version of the table data. Each table can use a different style. |
|
Outputs CL formatted file called |
|
Resolves IP addresses in formatted output. |
|
Shows unlimited table entries. |
|
Sets the maximum table entries that are shown to |
|
Adds Include the Caution - If you use the |
|
One or more entries that you add or remove from the table. |
|
Does not show a prompt to users before they run commands. |
|
One or more target appliances or servers for the |
Example:
> fw tab -t arp_table -a -e "1,2,3,4,5"
Adds an entry: <00000001,00000002,00000003,00000004,00000005,>
to arp_table
fw tab - m 100 -r sample-gw
Notes
expire
attribute, when you use the -a parameter to add entries, the default table timeout is added. This feature only works on local machine kernel tables and does not work on a remote machine's tables like additional fw tab
commands.-x
flag can be used independently of the -e
flag in which case the entire table content is deleted.Description Displays the Security Gateway major and minor version number and build number.
Syntax
> fw ver [-k][-f <
filename>]
Parameter |
Description |
---|---|
|
Prints the version name and build number of the kernel module. |
|
Prints the version name and build number to the specified file. |
Description Generates a report for SmartReporter. Both command line parameters are required. Run this command from Expert Mode.
Syntax # GeneratorApp <
Directory> <
ReportID>
Parameter |
Description |
---|---|
|
The result directory, the location at which the result is put. |
|
The report ID required for command line generations. The Report ID must be enclosed within curly braces For a list of all Report IDs see Predefined Reports in the R80.10 SmartReporter Administration Guide. |
Example:
For automatic directory computation use ""
. In this case, the directory should be as follows:
<
Result location>/<
Report Name>/<
Generation Date and Time>
Description Manages processes running on the Security Gateway collectively or individually and includes the following:
Cache operations, such as emptying the cache, as well as providing debug information.
Finds statistics such as:
View the alert and warning log regarding debug.
Syntax
# ldapcmd -p {<
process_name>|all} <
command> [-d debug_level] [command_arg]
Parameter |
Description |
---|---|
|
Runs a specified process or all processes. |
|
Valid values for the
|
|
Specifies whether or not to create LDAP logs. |
Description
Performs compare queries. Prints a message whether the result returned a match or not. ldapcompare
opens a connection to an LDAP directory server, and binds and performs the comparison specified on the command line or from a specified file.
Syntax
# ldapcompare -d [<
options>] dn <
attribute> <
value>
Parameter |
Description |
---|---|
|
Debug flag. |
|
See below. |
|
The DN object. |
|
The attribute of the DN object. |
|
The value of the attribute of the DN object. |
The ldapcompare
options:
-u -
Include user-friendly entry names in the output.-d <
level> -
Set LDAP debugging level to level
-F sep -
Print sep
instead of =
between attribute names and values.-f <
file> -
Perform sequence of compares listed in file
-D <
binddn> -
Bind DN.-w <
passwd> -
Bind password (for simple authentication).-h <
host> -
LDAP server.-p <
port> -
Port on the LDAP server.-T <
timeout> -
Client side timeout for all operations (in milliseconds).-l <
time limit> -
Server side time limit (in seconds) for compare.-z <
size limit> -
Server side size limit (in entries) for compare.Description
A utility program to port from Member Mode to MemberOf Mode. This is done by searching all specified group/template entries and fetching their Member attribute values.
Each value is the DN of a member entry. The entry identified by this DN is added to the MemberOf attribute value of the group/template DN at hand. In addition, those Member attribute values will be deleted from the group/template unless Both Mode is specified.
When your run the program, a log file, ldapconvert.log
is generated in the current directory. It logs all modifications done and errors encountered.
Syntax
> ldapconvert -d -h <
host> -p <
port> -D user_DN -w <
secret> [-g group_DN | -f <
file>]
-m mem_attr -o memberof_attr –c memberobjectclass[<
extra options>]
Parameter |
Description |
---|---|
|
Debug flag. |
|
LDAP server IP address. |
|
LDAP server port number. |
|
LDAP bind DN. |
|
LDAP bind password. |
|
Group or template DN to perform the conversion on. May appear multiple times for multiple entries. |
|
File containing a list of group DNs each separated by a new line. |
|
LDAP attribute name when fetching and (possibly) deleting a |
|
LDAP attribute name when adding |
|
LDAP |
|
See below. |
The ldapconvert extra options
are as follows:
-M
- Maximum number of member LDAP updated simultaneously. Default is 20.-B
- Convert to Both Mode.-p <
port> -
LDAP port. Default is 389.-T <
timeout> -
Client side timeout for LDAP operations, in milliseconds. Default is never
-l <
time limit> -
Server side time limit for LDAP operations, in seconds. Default is never
-s
-Server side size limit for LDAP operations in entries. Default is none
-z -
Use SSL.Note - We recommend you make a backup of the LDAP server before running the conversion program in case unrecoverable errors are encountered.
There are two GroupMembership
modes. You must keep these modes consistent.
For example, if you apply conversion on LDAP users to include MemberOf
attributes for their groups, then this conversion has to be applied on LDAP defined templates for their groups.
Symptom:
A command runs with the option –M
fail. The program stops with an error message stating the connection stopped unexpectedly.
Solution:
The LDAP server could not handle that many LDAP requests simultaneously and closed the connection.
Run the program again with a lower value for the –M
option. The default value should be adequate but can also cause a connection failure in extreme situations. Continue to reduce the value until the program exits normally. Each time you run the program with the same set of groups the program will pick up where it left off.
Example 1:
A group is defined with the DN: cn=cpGroup,ou=groups, ou=cp, c=il
and the following attributes:
... cn=cpGroup uniquemember="cn=member1,ou=people, ou=cp,c=il" uniquemember=" cn=member2, ou=people, ou=cp,c=il" ... |
For the two member entries:
... cn=member1 objectclass=fw1Person ... |
and:
... cn=member2 objectclass=fw1Person ... |
Run: ldapconvert
with the following arguments:
ldapconvert -g cn=cpGroup,ou=groups, ou=cp, c=il -h myhost -d cn=admin -w secret |
The result for the group DN will be as follows:
... cn=cpGroup ... |
The result for the two member entries will be as follows:
... cn=member1 objectclass=fw1Person memberof="cn=cpGroup,ou=groups, ou=cp, c=il" ... |
and:
... cn=member2 objectclass=fw1Person memberof=" cn=cpGroup,ou=groups, ou=cp, c=il" ... |
If you run the same command with the –B
options, it will produce the same result but the group entry will not be modified.
Example 2:
If there is another member attribute value for the same group entry:
uniquemember="cn=template1,ou=people, ou=cp,c=il" |
and the template is:
cn=member1 objectclass=fw1Template |
After running the same command line the template entry will stay intact because the command line specified the option –c fw1Person
, but the object class of template1 is fw1Template
Description
Imports users to an LDAP server. The input file must be in the LDIF format.
Syntax
# ldapmodify -a -c -d -h <
host> -p <
port> -D <
LDAPadminDN> -p <
LDAPadminPassword>
-f <
exportfilename>.ldif -d
Parameter |
Description |
---|---|
|
Adds users. |
|
Continue on errors. |
|
LDAP server IP address. |
|
Debug flag. |
|
LDAP server port number. |
|
LDAP administrator DN. |
|
LDAP administrator password. |
|
Specifies the name of the input file. This file must be in the LDIF format. |
Note - You can import the Security Management user database to an LDAP server by first generating an LDIF file using fwm dbexport
, and then using ldapmodify
Before importing, prepare the LDAP directory as follows:
ldapmodify
command:ldapmodify -a -h <host> -p <port> -D <LDAPadminDN> -w <LDAPadminPassword> objectclass: organization o:myOrg |
Example:
Importing users using ldapmodify
:
fwm dbexport
and use hello1234
as the pre-shared secret.fwm dbexport -l -f ./o_file.ldif -s "o=bigcorp,c=uk" -k hello1234 |
"o=bigcorp,c=uk"
branch.ldapmodify -a -c -h <host> -p <port> -D bindDN -w bindPas -f ./o_file.ldif |
Description
Queries an LDAP directory and returns the results.
Syntax
ldapsearch [options] filter [attributes] -d
Parameter |
Description |
---|---|
|
See the |
|
RFC-1558 compliant LDAP search filter. For example, |
|
The list of attributes to be retrieved. If no attributes are given, all attributes are retrieved. |
|
Debug flag. |
The following are the attributes for options:
-A -
Retrieve attribute names only, without values.-B -
Do not suppress printing of non-ASCII values.-D bindDN -
The DN to be used for binding to the LDAP server.-F separator -
Print separator
between attribute name and value instead of =
-h host -
The LDAP server identified by IP address or resolvable name.-l timelimit -
The server side time limit for search, in seconds.-p portnum -
The port number. The default is standard LDAP port 389.-S attribute -
Sort the results by the values of attribute
-s scope -
One of the following: base
, one
, sub
-b -
Base distinguished name (DN) for search.-t -
Write values to files in /tmp
. Each attribute-value pair is written to a separate file, named: /tmp/ldapsearch-<
attribute>-<
value>
.For example, for the fw1color
attribute, the file written is named /tmp/ldapsearch-fw1color-a00188
-T timeout -
Client-side timeout in milliseconds, for all operations.-u -
Show user friendly entry names in the output. For example, show cn=Babs Jensen, users, omi
instead of cn=Babs Jensen, cn=users,cn=omi
-w password -
The password.-Z -
Encrypt using SSL.-z sizelimit -
Server-side size limit for search, in entries.Example:
ldapsearch -p 18185 -b cn=omi objectclass=fw1host objectclass
The LDAP directory will be queried for fw1host
objects using port number 18185 with DN common name omi
. For each object found, the value of its objectclass
attribute is printed.
Description This tool executes SAM (Suspicious Activity Monitoring) actions according to information received through standard input. This tool is for executing SAM actions with the user defined alerts mechanism.
Syntax
sam_alert [-o] [-v] [-s <
sam_server>] [-t <
timeout>] [-f <
fw_host1> <
fw_host2>...]
[-C] [-n|-i|-I -src|-dst|-any|-srv]
Parameter |
Description |
---|---|
|
Prints the input of this tool to the standard output (for pipes). |
|
Turns on verbose mode of the |
|
The SAM server to be contacted. Localhost is the default. |
|
The time period, in seconds, for which the action will be enforced. The default is forever. |
|
Identifies the firewalls to run the operation on. Default is |
|
Cancels the specified operation. |
|
Notify every time a connection that matches the specified criteria passes the Firewall. |
|
Inhibit connections that match the specified criteria. |
|
Inhibit connections that match the specified criteria and close all existing connections that match the criteria. |
|
Match the source address of connections. |
|
Match the destination address of connections. |
|
Match either the source or destination address of the connection. |
|
Match specific source, destination, protocol and service. |
Description Configures the SmartReporter web upload script. For the complete upload procedure and additional information refer to the section How to Upload Reports to a Web Server in the R80.10 SmartReporter Administration Guide.
Syntax
# svr_webupload_config [-i <
perl_int_loc>]
[-p <
rep_dir_root>]
Parameter |
Description |
---|---|
|
Specifies the Perl interpreter location. |
|
Specifies the path for the reports virtual directory. |