User-defined policies are forwarding policies defined for privileged users to obtain network permissions without going through user authentication, security checks, or authorization.
A user-defined policy indicates that certain forwarding rules are defined manually in the SACG authentication policy to process certain special packets before the Agile Controller processes packets.
Applying a user-defined policy to an interzone is equivalent to applying a packet-filtering policy that has precedence over the SACG authentication function in the interzone. When forwarding packets, the device first matches packets with user-defined policies. If the packets do not match any user-defined policy, the device uses the SACG authentication function for authentication and authorization. Therefore, the user-defined policy can be configured for certain privileged users.
rule name rule-name
description description-information
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.
If multiple interworking policies are configured, they are matched based on their priorities. By default, policies configured earlier have higher priorities. You can use the rule move command to manually change the policy priorities. If the traffic matches an interworking policy, the remaining interworking policies are ignored. Therefore, you must place the policies from the most specific to the least specific.
Task |
Command |
|---|---|
Specify a source IP address. |
|
Specify a destination IP address. |
|
Configure a service (reference a service or service group). |
|
Specify the validity period. |
time-range time-range-name |
You can create different policies in one policy view for different types of traffic. By default, the earliest configured policy has the highest priority and is preferentially matched. You can use commands to change the policy priorities. For details, see Follow-up Procedure.
action { permit | deny }
The specified action is taken for the traffic matching the interworking policy. permit: permits the traffic that matches the rule. deny: implements authentication for users whose the traffic matches the rule.
You do not need to run the following command if a interworking policy has been applied in Configuring the Connection Between the SACG and Service Controller. If no interworking policy has been applied, run the following command:
firewall interzone [ vpn-instance vpn-instance-name ] zone-name1 zone-name2
apply packet-filter right-manager { inbound | outbound }
User-defined policies take effect immediately after being created. Therefore, you do not need to apply interworking policies for them.
You can make the following adjustments to configured user-defined policies:
rule move rule-name1 before rule-name2
rule move rule-name1 after rule-name2
rule move rule-name1 up
rule move rule-name1 down
rule move rule-name1 top
rule move rule-name1 bottom
To view priorities of each rule, run the display rightm-policy rule all command. The order in which rules are displayed indicates their matching order.
[sysname] display rightm-policy rule all Total:3 RULE ID RULE NAME STATE ACTION HITS ------------------------------------------------------------------------------- 2 aa enable - 0 1 1 enable - 0 0 default enable - 0 -------------------------------------------------------------------------------