Updated on 2026-11-10 GMT+08:00

Configuration Process

If an enterprise router is connected to multiple VPCs, traffic between VPCs is directly forwarded through the enterprise router by default and does not undergo security inspection. To implement security protection, such as intrusion prevention and access control, on the internal traffic (east-west traffic) between VPCs, you can use the routing policy of the enterprise router to divert the traffic to CFW. After the traffic is inspected and permitted by CFW, the traffic is forwarded to the destination VPC.

This section uses the traffic between two VPCs (VPC1 and VPC2) as an example to describe how to use the enterprise router to route traffic to CFW. The configuration process is as follows.

Table 1 Configuration and usage process in enterprise router mode

Procedure

Description

Creating a VPC Border Firewall

Create a VPC border firewall and plan the CIDR blocks dedicated to traffic redirection for the VPC border firewall.

Configuring the Enterprise Router to Divert Traffic to CFW

Add VPC attachments.

You need to create two types of attachments.

  • Type 1: used for traffic forwarding between the enterprise router and CFW.

    After a firewall is created, a CFW attachment (name: cfw-er-auto-attach, attachment type: CFW) is automatically generated on the enterprise router. This attachment is used to forward traffic between the enterprise router and CFW. You do not need to manually create the attachment.

  • Type 2: used for traffic forwarding between the VPC and the enterprise router.

    Each time a protected VPC is added, an attachment needs to be added. In this example, add two attachments.

    1. Add an attachment between VPC1 and the enterprise router.
    2. Add an attachment between VPC2 and the enterprise router.

Create and configure route table 1 to send VPC traffic to CFW.

  1. Create route table 1 to send VPC traffic to CFW.
  2. Configure route table 1.
    1. Create an association.

      Each time a protected VPC is added, an association needs to be added. In this example, add two associations.

      1. Associate VPC1 with route table 1.
      2. Associate VPC2 with route table 1.
    2. Create a route to forward enterprise router traffic (the traffic sent from the VPC to the enterprise router) to CFW.

Create and configure route table 2 to send the traffic protected by CFW to the VPC.

  1. Create route table 2 to send the traffic protected by CFW to the VPC.
  2. Configure route table 2.
    1. Create an association to associate CFW with route table 2.
    2. Create a propagation.

      Each time a protected VPC is added, a propagation needs to be added. In this example, add two propagations.

      1. Forward the traffic processed by CFW to VPC1 through the enterprise router.
      2. Forward the traffic processed by CFW to VPC2 through the enterprise router.

Manually add routes pointing to the enterprise router in the VPC route tables.

Each time a protected VPC is added, a route needs to be added for the VPC. In this example, configure two routes.

  1. Configure routes in the route table of VPC 1.
  2. Configure routes in the route table of VPC 2.

Enabling the VPC Border Firewall and Ensuring the Traffic Passes Through CFW

Enable VPC border traffic protection and check whether the traffic passes through CFW.