After creating an IPsec connection, you can manually add a policy-based route. In this way, traffic is forwarded based on both the source IP address and the destination IP address.
- Log on to the VPC console.
- In the left-side navigation pane, choose .
- Select the region of the target VPN Gateway.
- On the VPN Gateways page, find the target VPN Gateway and click the instance ID in the Instance ID/Name column.
- On the Policy-based Routing page, click Add Route Entry.
On the Add Route Entry page, configure a policy-based route according to the following information and click
Configuration Description Destination CIDR Block Enter the private CIDR block of the on-premises data center. Source CIDR Block The private CIDR block of the VPC. Next Hop Type Select IPsec-VPN connection. Next Hop Select the target IPsec connection instance. Publish to VPC Select whether to publish the new route entry to the VPC route table.
Note If you select No, after you add a policy-based route, you also need to publish the route in the policy-based route table.
- (Recommended) Yes: Publish the new route entry to the VPC route table.
- No: Do not publish the new route entry to the VPC route table.
Weight Select a weight. Valid values:
The larger the weight, the higher the routing priority.