The audit profile must be referenced in an audit policy for the profile to take effect. This section describes how to configure an audit policy.
Plan the policies as follows before an audit policy configuration:
In commands, audit policies exist by means of rules, and therefore audit policy rules are equal to audit policies in this topic.
rule name rule-name
description description
The description must be clearly specified, so that an administrator can easily find and maintain the policy.
add tag tag-name
After policies reference tags, you can query policies based on tags and delete, move, enable, or disable policies in batches based on query results. For the tag description and configuration, see Tag.
Audit policies are processed from top to bottom. If the traffic matches a policy, the rest policies are ignored. Therefore, policies must be configured in order from the most specific to the least specific.
Each policy contains multiple matching conditions, such as security zones and interfaces. The traffic matches a policy only if the attributes of the traffic meet all the conditions defined in the policy. By default, all the conditions are set to any. In such a case, all traffic matches the policy.
Each condition in a policy has multiple values. If one of the values in a condition is met, the traffic meets the condition.
Function |
Command |
|---|---|
Set the source security zone. |
source-zone { zone-name &<1-6> | any } |
Set the destination security zone. |
destination-zone { zone-name &<1-6> | any } |
Set the source IP address and region. |
|
Set the destination IP address and region. |
|
Set a user, user group, or security group. |
user { username user-name &<1-6> | user-group user-group-name &<1-6> | security-group security-group-name &<1-6> | any } Users and user groups reflect the horizontal organizational structure. Users and security groups reflect the vertical organization structure. You can configure users and user groups based on company departments or add users from different departments to one security group for management. |
Configure a service (by referencing a service or service group). |
|
Configure a service (by referencing a TCP/UDP port or IP-layer protocol). |
|
Specify the validity period of the policy. |
time-range time-range-name |
action { audit profile audit-profile | no-audit }
After creating, modifying, or deleting an audit profile, you need to commit the audit profile to make the audit profile and the audit policy that references the audit profile take effect.
After configuring audit policies rules, you can perform the following operations to modify parameters: