Configuring Cloud Interconnect access to cloud networks behind NGFWs
In this tutorial, we will create a secure high-availability Yandex Cloud network infrastructure using a next-generation firewall (NGFW) to segment it into security zones. Each network segment will contain single-purpose resources isolated from others. For example, we will place public-facing services, e.g., frontend applications, in the DMZApplication segment. Each segment will have its own cloud folder and a dedicated VPC cloud network. To connect these segments, we will use Next-Generation Firewall VMs deployed in two availability zones to ensure fault tolerance.
In Yandex Cloud tutorials, you can find the following NGFW-based implementations of a fault-tolerant network infrastructure:
To establish IP network connectivity between resources in your infrastructure and cloud resources in Yandex Cloud, you can use Yandex Cloud Interconnect.
In this tutorial, you will set up routing for your cloud network and configure a Cloud Interconnect private connection to enable network connectivity between your on-premise infrastructure and segments hosted behind the NGFW.
You can see the solution architecture in the diagram below.
| Name | Description |
|---|---|
| FW-A | Primary NGFW in zone A |
| FW-B | Standby NGFW in zone B |
VPC interconnect |
VPC to connect your infrastructure using Cloud Interconnect |
VPC dmz |
VPC hosting frontend internet-facing applications |
VPC app |
VPC hosting backend applications |
A.A.A.0/24 |
interconnect VPC subnet hosting FW-A |
B.B.B.0/24 |
interconnect VPC subnet hosting FW-B |
C.C.0.0/16 |
Aggregated prefix of the dmz VPC subnets you want to access from your on-premise infrastructure |
D.D.0.0/16 |
Aggregated prefix of the app VPC subnets you want to access from your on-premise infrastructure |
Traffic routing from your on-premise infrastructure to the VPC-hosted dmz and app resources
If the prerequisites are met and your cloud route tables and Cloud Interconnect are configured according to steps below:
- Your on-premise infrastructure traffic will arrive at the primary NGFW that will route it to the relevant VPC:
dmzorapp. - If the primary NGFW fails, the
route-switchermodule will redirect the traffic arriving at the primary zone to the standby NGFW in the different availability zone. - If the availability zone with the primary NGFW fails, the
route-switchermodule will redirect traffic to a standby NGFW that will further route it to the relevant VPC:dmzorapp.
Prerequisites
- Use
route-switcher to switchinterconnect,dmz, andappVPC-directed traffic from the primary to the standby NGFW if the first one fails. You can read aboutroute-switcherin the UserGate NGFW and Check Point NGFW tutorials. - Network prefixes in the route tables must not overlap with your on-premises network prefixes.
- Routes announced from your on-premise infrastructure through Cloud Interconnect must not overlap with the address spaces of the
interconnect,dmz, orappVPC subnets. - IP prefixes added to the virtual router, i.e.,
A.A.A.0/24,B.B.B.0/24,C.C.0.0/16, andD.D.0.0/16in our example, must not overlap. - Configure security policies on the NGFW to allow access from VPC
interconnectto VPCdmzandappas per your organization's security requirements. - Add routes to the networks used in your on-premises infrastructure to the routing tables for the
dmzandappVPC subnets. A common practice is to use the default route,0.0.0.0/0. For these routes, specify the IP address of the primary NGFW in the appropriate VPCdmzorappasNext hop. - Configure static routes on the NGFW to the networks used in your infrastructure. For these routes, specify the gateway address (the first address in the subnet range, e.g.,
x.x.x.1for the x.x.x.0/24 subnet) from the cloud subnet of the NGFW interface in VPCinterconnectasNext hop. - We recommend you to plan your
dmzandappVPC network address space the way you can use aggregated prefixes. In our example, it isC.C.0.0/16andD.D.0.0/16. With aggregated prefixes, you will only need to configure VPCinterconnectroute tables and prefix announcements in the virtual router once. When adding new subnets to VPCdmzandapp, you will not need to change these settings.
Configuring interconnect VPC route tables
Configure route tables in the interconnect VPC according to the tables below and apply them to the primary and standby NGFW-hosting subnets.
Create a route table containing more specific routes (with a network prefix /17) to the dmz and app VPC subnets and apply it to the primary NGFW-hosting subnet, i.e., A.A.A.0/24 in zone A. Remember to add prefixes from that table to the announcement settings of the virtual router for the primary NGFW's availability zone.
| Destination prefix | Next hop |
|---|---|
C.C.0.0/17 |
FW-A IP address in the interconnect VPC |
C.C.128.0/17 |
FW-A IP address in the interconnect VPC |
D.D.0.0/17 |
FW-A IP address in the interconnect VPC |
D.D.128.0/17 |
FW-A IP address in the interconnect VPC |
Create a route table containing less specific routes (with a network prefix /16) to the dmz and app VPC subnets and apply it to the standby NGFW-hosting subnet, i.e., B.B.B.0/24 in zone B. Remember to add prefixes from that table to the announcement settings of the virtual router for the standby NGFW's availability zone.
| Destination prefix | Next hop |
|---|---|
C.C.0.0/16 |
FW-B IP address in VPC interconnect |
D.D.0.0/16 |
FW-B IP address in VPC interconnect |
These settings ensure that traffic to the dmz and app VPC subnets is routed to the primary NGFW. If the primary NGFW fails, the route-switcher
By using more or less specific route table prefixes, you can configure the virtual router announcements so that your on-premise infrastructure traffic bound for the VPC dmz and app subnets goes to the primary NGFW's availability zone and, if that one fails, is redirected to the standby NGFW's availability zone.
Configure Cloud Interconnect and a virtual router
You can find the Cloud Interconnect deployment options in the documentation. For a fault-tolerant connection to the service, we recommend creating multiple trunks, one per point of presence.
-
Create trunks and organize their physical connection. If trunks have already been created, use the existing ones.
-
In each trunk, create a private connection.
-
Create a virtual router or select an existing one.
-
Add private connections to your virtual router.
-
Add an
interconnectnetwork to your virtual router and specify the following IP prefixes:Availability zone IP prefixes ru-central1-aA.A.A.0/24,C.C.0.0/17,C.C.128.0/17,D.D.0.0/17,D.D.128.0/17ru-central1-bB.B.B.0/24,C.C.0.0/16,D.D.0.0/16
/17 prefixes route traffic to the zone with the primary NGFW. If this zone becomes unavailable, more specific prefixes stop being announced and traffic is routed through /16 prefixes to the zone with the standby NGFW.
Check the status of BGP sessions for private connections through monitoring.
If you are creating new subnets on an already announced aggregate prefix, you do not need to change the virtual router settings. To announce a prefix outside of the configured aggregate, update the IP prefixes on your own.