Create and manage instances

Updated at:
Copy as MD

An Egress Proxy Gateway (EPG) instance is the unified explicit proxy entry point for application-layer outbound traffic in a VPC. Client applications send HTTP/HTTPS requests to the EPG instance by configuring a proxy address. EPG applies security control and traffic scheduling to the outbound traffic, and selects an egress IP address from an egress address pool to forward each request to the target service.

Plan and prepare

  • Account permissions: The first time you create an EPG instance, the system guides you through creating the service-linked role AliyunServiceRoleForEpg. EPG uses this role to access resources of other Alibaba Cloud services, such as elastic IP addresses (EIPs) and Simple Log Service.

  • Egress proxy configuration: Creating an EPG instance requires an egress proxy configuration in the same region. We recommend that you complete creating a configuration first.

Create an instance

  1. Log on to the EPG console. In the left-side navigation pane, choose Instance Management>Instance List, and then click Create Instance.

  2. On the Create Instance page, configure the following settings, and then click Confirm Creation.

    • Instance Name: Required. Enter a name that is easy to identify.

    • Region: Select the region to which the target VPC belongs.

    • Virtual Private Cloud: Select the VPC in which the application whose outbound traffic you want to proxy resides.

    • Create Default Address Pool: Select this check box to create a default address pool for the instance. You must set the Network type of the address pool to Public network or Private network.

    • Availability Zone/VSwitch: To ensure high availability of your business, we recommend that you select at least two zones and the corresponding vSwitches. If you select Create Default Address Pool, you must also select the EIPs that the address pool uses in each zone (public address pool), or specify the Number of IP addresses to be automatically allocated (private address pool). For more information, see Manage egress address pools.

    • Associated Configuration: You can associate only an Egress Proxy Configuration that resides in the same region. If no configuration is available, click Create egress proxy configuration in the lower-left corner of the egress proxy configuration list to create one.

      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. The configuration associated with an instance cannot be changed after the instance is created.
    • Listening: By default, the instance contains two listeners, HTTP:1080 and HTTPS:443. You can change the port numbers as needed, or click Add Listener to create additional listeners, subject to the quota.

      An instance must contain at least one HTTP listener and one HTTPS listener.
      A listener port cannot be modified after it is created, so make sure that the port is correct before you submit.
    • TLS interception configuration: After you select this check box, EPG can decrypt HTTPS traffic and perform content-based rule matching, such as inspecting request headers and URL paths. You must select a private CA certificate, and clients must trust the private CA certificate to communicate with the instance. For more information, see TLS interception and decryption.

  3. After the instance is created, you can obtain the DNS domain name of the instance on the Basic Information tab of the instance details page. The format is similar to epg-xxx.cn-shanghai.epg.aliyuncs.com. You use this domain name later when you configure proxy access.

What to do next

  • Create an egress address pool: allocates egress IP addresses for the instance. An instance can forward traffic only after a default address pool is configured.

  • Proxy access: configures the proxy address on the client so that outbound traffic is directed to the EPG instance.

  • Configure proxy rules: defines the match conditions and the allow or deny policies for outbound traffic.

Instance status

Instance status

Description

Creating

The instance is being created and is not available yet.

Running

The instance runs normally and can process traffic.

Changing

The configuration of the instance is being changed. Change operations on listeners, TLS interception, the egress proxy configuration, and egress address pools are temporarily unavailable.

Stopped

The instance is stopped and no longer processes traffic.

Manage listeners

On the Listener configuration tab of the instance details page, you can perform the following operations:

  • Add a listener: Click Add Listener. In the dialog box, select a Protocol and enter a Port that does not duplicate a port already in use, and then click Confirm.

  • Delete a listener: In the Operation column of the target listener, click Delete and then confirm the deletion. An instance must retain at least one HTTP listener and one HTTPS listener. Deleting a listener affects the clients that access the instance through that listener, so make sure that no workload depends on the listener before you proceed.

  • Enable or disable TLS interception: Click Edit next to TLS interception configuration to enable or disable TLS interception, and then click Save. To enable TLS interception, you must select a private CA certificate. For more information, see TLS interception and decryption.

Manage egress address pools

  • On the Egress address pool tab of the instance details page, you can create an egress address pool for the instance, specify the default address pool, and manage the IP addresses in an address pool.

  • An instance can contain multiple egress address pools. The first address pool that you create automatically becomes the default address pool. An instance can forward traffic only after a default address pool is configured.

Cloud Firewall protection

You can enable Cloud Firewall protection with one click on the Basic Information tab of the instance details page to detect threats in outbound traffic.

Manage the associated egress proxy configuration

On the Egress Proxy Configuration tab of the instance details page, you can perform the following operations:

  • View the egress proxy configuration that is currently associated with the instance.

  • View the default actions of the egress proxy configuration in the PreDns, PreRequest, and PostResponse phases.

  • View the rule groups that are bound to the egress proxy configuration. You can edit the priority of a rule group and unbind a rule group.

Delete an instance

Warning
  • Deleting an instance is irreversible. All egress address pools that are associated with the instance are cascade deleted and cannot be restored.

  • Deleting an instance affects the clients that access the service through the instance. Make sure that no workload depends on the instance before you delete it.

On the Instance List page of the EPG console, find the target instance. In the Operation column, click Delete, and then click Confirm.

Quotas

To request a quota increase, contact your business manager.

Quota item

Default value

Adjustable upper limit

Number of EPG instances per account per region

100

-

Number of listener ports per instance

2

50

Number of egress address pools per instance

10

100