Create and manage egress proxy configurations
By using an egress proxy configuration, you can define a set of outbound access control policies in a central place: set a default action (Allow or Deny) for each processing phase, and reference multiple rule groups by priority to finely control outbound traffic. After the configuration is associated with an instance, it takes effect on the outbound traffic of that instance.
Request processing phases
An outbound request passes through three processing phases in sequence inside Egress Proxy Gateway (EPG). An egress proxy configuration defines a default action for each phase and references one or more rule groups by priority. When a request enters a phase, the rules in the referenced rule groups are matched by priority: if a rule is hit, the action defined by that rule is performed; if no rule is hit, the default action of the phase is performed. Allow passes the request to the next phase, and Deny terminates the request.
If TLS interception is not enabled on an instance, for an HTTPS request the client uses the CONNECT method to establish an end-to-end encrypted tunnel through EPG to the destination server. EPG only forwards the traffic and cannot parse the request content inside the tunnel. In this case, the HTTPS request does not enter the PreRequest phase, and neither the rules nor the default action of that phase take effect; the request is forwarded directly through the default address pool. To control HTTPS traffic, enable TLS interception. To control traffic only by source IP or destination domain name, you can configure rules in the PreDns phase.
|
Phase |
When it runs |
Purpose |
|
PreDns |
Before EPG performs DNS resolution for the domain name in the client request. |
Makes the interception decision before DNS resolution. For example, access to malicious domain names is blocked directly, and the request does not enter the resolution process. |
|
PreRequest |
After DNS resolution and before the request is sent to the destination service. |
The core policy control phase. Based on complete information such as the full domain name, URL, and headers, it decides whether to allow the request to access the internet, and selects an egress address pool for the allowed requests. |
|
PostResponse |
After the destination service returns a response. |
Performs post-processing on the response, such as logging and inspection based on the response content. |
Create an egress proxy configuration
-
Log on to the EPG console and select the region where the target EPG instance resides. In the left-side navigation pane, choose Configuration Management > Egress Proxy Configuration, and then click Create Egress Proxy Configuration.
-
On the Create egress proxy configuration page, complete the following settings and click Create.
-
Egress Proxy Configuration Name: Required. Enter an easily recognizable configuration name.
-
Default Rule Phase Action: Select a default action (Allow or Deny) for the PreDns phase and the PreRequest phase. The default action of the Post-Response Phase is fixed to Allow and cannot be modified.
-
Associate with an instance
An egress proxy configuration must be associated when you create an instance; after the configuration is associated with an instance, it takes effect on the outbound traffic that is proxied by that instance. An egress proxy configuration and an instance have a one-to-one relationship: each instance is associated with only one egress proxy configuration, and each egress proxy configuration is associated with only one instance.
Edit default phase actions
On the egress proxy configuration details page, next to Default phase action, click Edit. Select a default action (Allow or Deny) for the PreDns Phase and the PreRequest Phase, and then click Save. The default action of the Post-Response Phase is fixed to Allow and cannot be modified.
Bind and unbind rule groups
On the Rule Group tab of the egress proxy configuration details page, you can perform the following operations:
-
Bind a rule group: Click Bind Rule Group. In the dialog box, select the target rule group (only rule groups in the current region can be selected), enter the Rule group priority (valid values: 1 to 1000), and then click Confirm.
An egress proxy configuration supports binding multiple rule groups. When multiple rule groups are bound, if the rule groups are associated with egress address pools, these address pools must belong to the same EPG instance.
A rule group that is already bound to the current configuration cannot be bound again. The priority of a rule group determines its matching order in the configuration, and a smaller value is matched first.
-
Edit a rule group priority: Find the target rule group. In the Rule group priority column, click Edit, enter a new priority (1 to 1000, which cannot be the same as the priority of another rule group under the same configuration), and then click Confirm.
-
Unbind a rule group: In the Operation column of the target rule group, click Unbind and confirm the operation. To unbind rule groups in batches, select multiple rule groups, click Unbind in batches in the lower-left corner of the list, and then confirm the operation.
Delete an egress proxy configuration
An egress proxy configuration can be deleted only when it is not associated with an instance.
On the Egress Proxy Configuration page in the EPG console:
-
Delete a single configuration: In the Operation column of the target configuration, click Delete and confirm the operation.
-
Delete multiple configurations: Select multiple configurations, click Batch Delete in the lower-left corner of the list, and then confirm the operation.
Limits
|
Limit item |
Maximum value |
|
Number of egress proxy configurations per account per region |
100 |
|
Number of rule groups that can be bound to each egress proxy configuration |
10 |