Mastering OCI Networking - Scenario 1 (Hub and Spoke with OCI Firewall)- Part B

Karthik Mani
12 Jun 202313:41

Summary

TLDRThis video demonstrates the setup of an urban topology with an OC FI wall deployed in a hub-and-spoke network. It covers the creation of three VCNs, side-to-side VPN configuration, and network routing validation using the network visualizer. The presenter explains DRG route table configurations for on-prem and spoke VCNs, dynamic routing, and firewall inspections. It also includes details on the use of load balancers, web servers, and how to validate traffic through trace paths and log checks, ensuring proper firewall routing and traffic flow across the network.

Takeaways

  • 😀 Overview of the setup involving Urban Spook topology with an OCFI wall deployed in a Hub.
  • 🌐 Explanation of three VCNS (VCNA as Hub, VCNB, and VCNC as spokes) and a Site-to-Site VPN connected to an on-prem CP.
  • 🔄 Network validation is done using the Network Visualizer tool to check the connections between the on-prem network and the VCNS.
  • 🛠 Detailed configuration of DRG (Dynamic Routing Gateway) route tables for on-prem, spoke VCNS, and the Hub VCN.
  • 🔗 Static route configuration for future VCNs to connect through the Hub VCN.
  • 🚧 Import route distribution helps automatically download routes learned from IPsec and VCN attachments.
  • 📶 Traffic inspection is done via firewalls, routing traffic between on-prem networks and spoke VCNS through the Hub.
  • 🚦 Configuration of private and public subnets in Hub VCN with default routes pointing to the firewall and internet gateway.
  • 🖥 Load balancer setup in the public subnet for the web server, which is accessed through Oracle Cloud Infrastructure.
  • 📊 Logs and TracePath are used to verify that traffic is being routed through the firewall correctly.

Q & A

  • What is the purpose of the setup shown in the video?

    -The purpose of the setup is to demonstrate an urban spook topology using an OCI (Oracle Cloud Infrastructure) firewall, with a hub-and-spoke VCN (Virtual Cloud Network) model, side-to-side VPN, and DRG (Dynamic Routing Gateway) configuration for secure routing between on-premise and cloud environments.

  • What are the roles of the VCNA, VCNB, and VCNC in the topology?

    -In the topology, VCNA acts as the Hub VCN, while VCNB and VCNC are spoke VCNs. Traffic from the spoke VCNs is directed to the Hub VCN for centralized routing and inspection.

  • How does the routing between on-prem and cloud networks work in this setup?

    -Traffic from the on-prem network, which is in the 100.x.x.x range, is routed through a side-to-side VPN connection to the Hub VCN. The Hub VCN inspects the traffic and then forwards it to the spoke VCNs, ensuring secure and controlled routing.

  • How is the DRG configured in this setup?

    -The DRG (Dynamic Routing Gateway) is configured with multiple route tables: one for the on-prem network, another for the spoke VCNs, and a third for the Hub VCN. The DRG uses static and dynamic routes to forward traffic between the different components of the network.

  • What is the significance of the 'import route distribution' feature?

    -The 'import route distribution' feature allows automatic downloading of routes learned by the DRG. It simplifies routing configuration by dynamically importing routes from IPsec, virtual circuit attachments, and VCN attachments, and applying them to the route tables.

  • What is the purpose of creating a static route for the 172.16.0.0/16 CIDR range?

    -The static route for the 172.16.0.0/16 CIDR range is created to ensure that any future VCNs spun up within this CIDR range are properly routed to the Hub VCN, facilitating centralized traffic control.

  • Why are separate route tables used for the public and private subnets in the Hub VCN?

    -Separate route tables are used for the public and private subnets to ensure proper traffic segmentation. The public subnet routes to the internet gateway, while the private subnet routes traffic through a firewall and the dynamic routing gateway (DRG) for secure internal communication.

  • What is the role of the firewall in this setup?

    -The firewall, deployed in the private subnet of the Hub VCN, inspects incoming and outgoing traffic between the on-prem network, the internet, and the spoke VCNs. It ensures that only authorized traffic is allowed through the network.

  • How is traffic inspection validated in this setup?

    -Traffic inspection is validated by reviewing the DRG transit routing tables, performing trace paths to check if traffic flows through the firewall, and checking the firewall logs for details on source, destination, ports, and actions.

  • How is East-West traffic (traffic between spokes) handled?

    -East-West traffic between spoke VCNs is routed through the Hub VCN, where it is inspected by the firewall before being sent to its destination. The trace path and firewall logs can be used to verify this flow.

Outlines

00:00

🔧 Overview of Hub and Spoke Topology Setup

This paragraph introduces the video, where the creator provides a demonstration of a hub and spoke topology setup using Oracle Cloud Infrastructure (OCI) with a wall deployed in the hub. The explanation covers the creation of three Virtual Cloud Networks (VCNs) – a hub (VCN A) and two spokes (VCN B and C). The presenter sets up a site-to-site VPN with an on-premise network, where the on-prem network is in the 100.x range and the VCNs are in a different range. The network visualizer is used to verify routing, showing that the hub acts as the central point of connection for all spokes and the on-premise network.

05:00

🚦 DRG Configuration and Route Tables Explanation

This section delves into the configuration of the Dynamic Routing Gateway (DRG) and its route tables. The presenter explains the creation of three route tables: one for on-premise networks, one for spoke VCNs, and one for the hub VCN. They also explain the need for specific routing rules to manage traffic between on-prem and VCNs. Additionally, a static route is set up for future VCNs in a predefined CIDR range. Import route distribution is discussed, showing how routes are learned dynamically and applied to the route table, making the routing system efficient.

10:04

🔄 Hub VCN Routing and Firewall Configuration

The third paragraph focuses on the routing configuration for the hub VCN, which includes private and public subnets. Two route tables are created—one for the private subnet pointing to the NAT gateway and another for the public subnet pointing to the internet gateway. The presenter discusses the importance of including specific routes for public subnets and how implicit routing in OCI might bypass the firewall if not explicitly configured. The explanation covers common routing mistakes, especially regarding traffic inspection by the firewall, and stresses the need to ensure proper route overrides.

🌐 Load Balancer Setup and Traffic Inspection

Here, the speaker explains the deployment of a load balancer in the public subnet with a backend server. They show that both internet and on-premise servers can access the application hosted behind the firewall. East-West (internal) traffic flow is verified using tools like curl and trace path, showing how traffic passes through the firewall. They also demonstrate traffic inspection logs in the firewall for validation, providing detailed filtering options to check the source, destination, port, and action of inspected traffic.

Mindmap

Keywords

💡VCN (Virtual Cloud Network)

A Virtual Cloud Network (VCN) is a customizable private network within the Oracle Cloud Infrastructure (OCI). In the video, the speaker discusses setting up three VCNs, where VCNA serves as the hub, and VCNB and VCNC are the spokes. The VCNs allow the speaker to manage network communication between different cloud resources, with the Hub VCN acting as a central connection point.

💡Hub-and-Spoke Topology

Hub-and-Spoke topology is a network design where multiple 'spoke' networks connect to a central 'hub' network. In the video, the speaker explains this topology with VCNA being the hub and VCNB and VCNC as the spokes. All traffic from the spoke networks is routed through the hub VCN, facilitating centralized network control and security management.

💡DRG (Dynamic Routing Gateway)

A Dynamic Routing Gateway (DRG) allows traffic between a VCN and networks outside the cloud, such as on-premises networks. In the video, the speaker details the configuration of DRG route tables to manage traffic between on-premise networks and VCNs. The DRG plays a crucial role in routing traffic efficiently and ensuring connectivity between cloud and on-prem resources.

💡Route Tables

Route tables define the rules for directing network traffic within the cloud infrastructure. The video discusses creating several route tables to manage traffic between different VCNs, subnets, and on-prem networks. For instance, specific route tables handle traffic for public and private subnets, while others are used for the DRG and its connections to the spokes and the hub.

💡IPsec VPN

An IPsec VPN provides a secure connection between a Virtual Cloud Network (VCN) and an on-premises network. In the video, the speaker mentions setting up an IPsec VPN to connect an on-prem server to the OCI environment, showing how it allows secure communication between the cloud and physical infrastructure.

💡Network Visualizer

The Network Visualizer is a tool that allows users to view and validate their network topology and configuration in a visual format. The speaker uses this tool in the video to verify the connections between the hub, spokes, and the on-prem network, ensuring that the routing is functioning correctly. It visually confirms that traffic is properly routed through the hub VCN.

💡Firewall

A firewall is a security system that monitors and controls incoming and outgoing network traffic. In the video, the speaker describes deploying a firewall in the private subnet of the hub VCN. All traffic, whether from the internet or the on-premises network, is inspected by the firewall to ensure security, before being forwarded to its destination.

💡Subnet

A subnet is a segmented part of a VCN that can be used to isolate different resources within the network. In the video, the speaker sets up both public and private subnets in the hub VCN, with specific routing tables for each. The public subnet routes traffic to the internet gateway, while the private subnet routes internal traffic to a firewall.

💡Load Balancer

A load balancer distributes traffic across multiple servers to ensure availability and performance. In the video, the speaker configures a load balancer in the public subnet of the hub VCN to distribute traffic to a web server. This setup ensures that the application is accessible from the internet and that the traffic is managed efficiently.

💡Route Distribution

Route distribution refers to the process of propagating routes dynamically across a network. In the video, the speaker discusses creating import route distributions to automatically download and apply learned routes. This is used to ensure that the routing tables within the DRG are updated with the latest information, facilitating efficient network traffic management.

Highlights

Overview of the Urban Spook topology setup with an ocfi wall deployed in the hub.

Explanation of the three virtual cloud networks (VCNs) and their configuration: VCNA as the hub and VCNB/C as the spokes.

Demo of the site-to-site VPN configuration, showcasing a working tunnel between on-prem and VCN.

Validation of the network setup using the network visualizer tool to inspect routing correctness.

Detailed breakdown of the Dynamic Routing Gateway (DRG) route table setup for on-prem, spoke VCNs, and the hub VCN.

Step-by-step creation of static and dynamic routes, including IPsec virtual circuit attachments.

Configuration of DRG import route distribution to automatically download routes and create route tables.

Routing configuration for public and private subnets in the hub VCN, highlighting the use of firewalls for inspection.

Discussion on avoiding routing mistakes with OCI implicit route tables by overriding with specific routes.

Configuration of the NAT gateway and association with DRG transit routing tables to enable reverse traffic flow inspection.

Load balancer configuration in the public subnet, demonstrating backend server access via public IP address.

Demonstration of East-West traffic flow and inspection between spoke VCNs and on-prem network.

Validation of routing paths using trace path and logs to ensure traffic inspection through the firewall.

Analysis of firewall logs and filtering traffic by source, destination, and port to validate network traffic inspection.

Concluding demo showing successful access to the web server from both on-prem and internet environments.

Transcripts

play00:00

hello all welcome back to my channel

play00:03

and

play00:05

in this video I'm going to just quickly

play00:06

show you uh give you a video demo of my

play00:10

setup that I've created for this Urban

play00:12

spook topology with an ocfi wall

play00:15

deployed in the hub

play00:17

and if you are you are looking at the

play00:19

three vcns that I've created vcna will

play00:22

be the Hub mbnc are the spokes

play00:27

and I've also set up a side to side VPN

play00:31

with my on-prem CP which is this

play00:35

if I click on that you'd see one of the

play00:38

tunnels will be up just I've just

play00:40

configured one for the demo purpose

play00:42

and um

play00:44

that on on-prem network will be in 100

play00:47

range

play00:49

while the vcns are

play00:53

in this this range and a good way of

play00:56

validating your network setup and

play00:59

routing is done right is by going to the

play01:02

network visualizer

play01:05

and if you

play01:08

so I let the

play01:10

uh the map populate there you go so now

play01:13

if you see

play01:14

um you have an on-prem Network and three

play01:19

um

play01:20

recents and one of them is the Hub so if

play01:24

you select this link you'd see it was

play01:26

able to make a connection it has linked

play01:28

towards every Network point which is

play01:31

this you can see B and the on-prem

play01:33

network

play01:34

whereas if you select any other vcn or

play01:37

even the on-prem ipsec VPN it would be

play01:41

able to connect only to the hub vcn

play01:44

which means that the Hub vcn is the

play01:48

central Connecting Point for all these

play01:51

so any traffic that's going to come off

play01:53

this on-prem will be directed to the hub

play01:55

vcn and the Hub Vision will be able to

play01:58

send it after inspecting will be able to

play02:00

send it back to the spoke vcns so this

play02:03

is a good way of validating if your

play02:04

routing is right

play02:06

now let me quickly show you how the drg

play02:09

is configured let me show you the show

play02:11

you around the drg and its route tables

play02:13

so the first thing is the drg route

play02:16

table you will see route table number

play02:18

one which is meant for on-prem Route

play02:21

table number two which is meant for

play02:23

spoke vcns Android number three which is

play02:27

meant for the Hub vcn and the routable

play02:29

number one which is meant for uh

play02:33

the on-prem networks we are essentially

play02:38

advertising a static route of 170 to 16

play02:41

0.0 16 which is your OC C8 let's assume

play02:45

that you're going to any future vcns

play02:47

that are put you're going to spin up

play02:48

will be of this cidr range you will have

play02:51

to enter that range and then point it uh

play02:54

to your vcn hub

play02:56

uh which is vcna attachment

play02:59

and create a route table

play03:02

and Route table number two will be

play03:06

any traffic that's going to come out of

play03:07

these uh in Spoke vcns your oci vcns the

play03:12

be it uh internet or on-prem anything

play03:14

that any traffic that's going to come

play03:16

out of it will be down forwarded to your

play03:19

uh Hub vcn attachment

play03:23

and uh that's again a static of the

play03:25

nuclear create and for the Hub vcn you

play03:29

create a dynamic routing that is you

play03:31

create an import route distribution and

play03:33

how do you do it is by if you go to the

play03:36

drg and go to import route distribution

play03:39

you create a new import or distribution

play03:42

and add a similar policy where you

play03:46

include all IP second virtual circuit

play03:48

attachments you can also include your

play03:50

RPC attachments for those such few use

play03:52

cases um

play03:54

where you want to inspect traffic coming

play03:56

from your other region

play03:59

with the with the firewall and you also

play04:02

include the vcn attachments here

play04:06

um and use this what does import route

play04:08

distribution does is it automatically

play04:10

downloads all those routes that it

play04:11

learns and um you then create a route

play04:15

table using that

play04:18

uh

play04:19

so when you create it

play04:21

it would let you choose an import route

play04:23

distribution so you will just enable

play04:25

import or distribution and use of import

play04:28

and then say the changes now if you

play04:30

click on get all roads

play04:32

all those routes would appear

play04:34

automatically

play04:36

so this is my on-prem route and this is

play04:38

my workload server in which I've

play04:41

deployed a web server behind a load

play04:44

balancer

play04:46

excuse me so

play04:49

um so that's the drg route tables that

play04:52

I've created and after creating the dr0

play04:53

out tables I had to go and attach them

play04:55

to the

play04:57

vcns so the spoke vcns are going to have

play05:00

route table number two if you click on

play05:03

the vcn attachment click on edit

play05:05

Advanced options you will it will give

play05:08

you an option to choose the route table

play05:09

so you go change the route table here

play05:11

the one that you created do that for all

play05:14

these attachments and also for the ipsec

play05:16

attachment

play05:18

click open the attachment click on edit

play05:21

choose the drg route table and then we

play05:24

are good

play05:25

so you should be able so now so you've

play05:29

created those route tables attach it to

play05:30

the to associated with the attachments

play05:33

and any traffic that's going to come in

play05:35

hit the drg will use those respective

play05:38

route tables and Route those traffic to

play05:41

the destination

play05:43

and now let's go to the hub Vision

play05:45

routing configuration let me show you

play05:47

around

play05:49

what routes were required in the hub vcn

play05:53

and in the hub vcn you've got private

play05:55

and public subnet so you're going to

play05:57

need two route tables one for private

play06:01

and one for public

play06:03

in the public route table you will have

play06:06

a default route pointing to the internet

play06:07

gateway

play06:08

and the internal vcn will be pointed to

play06:11

the firewall

play06:13

whereas in the firewall is deployed in

play06:16

the private subnet so the private

play06:19

routing table will have the default

play06:21

route pointing to the nand Gateway and

play06:23

the on-prem and internal network will be

play06:25

pointed to the dynamic routing gateways

play06:30

and if you go to uh the drg transit

play06:34

routing table in which will be used to

play06:36

Route the traffic

play06:37

to the firewall incoming traffic from

play06:39

the drg to the firewall you had

play06:42

a default route pointing uh to your

play06:46

firewall and you also add another uh

play06:49

specific route for your 100 to 160.128

play06:53

which is your public subnet so

play06:57

you may ask why why would I write

play07:00

another route on when I already have a

play07:02

default route pointing to the firewall

play07:04

which is a valid question but then when

play07:07

an incoming traffic hits the drg

play07:09

incoming traffic from the drg hits the

play07:12

transit

play07:13

or the bcn attachment the vcn already

play07:17

knows that Monster energy 16

play07:19

0.128 uh it's it's part of an implicit

play07:23

route table that is already available

play07:25

with the oci so you writing a 0.0.0

play07:30

route finding the firewall does not mean

play07:33

that gets overwritten so it would still

play07:36

be able to send the traffic bypassing

play07:37

the firewall so it is it becomes

play07:39

important for you to

play07:41

um

play07:42

write that route

play07:44

[Music]

play07:44

um

play07:45

also pointing to the firewall so that

play07:47

you kind of override the implicit

play07:49

routing that oci does so this is a

play07:53

common

play07:54

um mistake or people miss doing this and

play07:58

they say that routing is not working so

play08:00

so this is an important aspect so don't

play08:03

forget don't forget to get this routing

play08:07

also added in your route table so after

play08:09

that is done

play08:12

um

play08:13

then the remaining is the not transit

play08:15

route table this is for the reverse

play08:18

traffic from other spoke vcns to go back

play08:21

to the firewall

play08:22

you use this and then associate it with

play08:24

the NAT gateways

play08:26

so you will see that routing table

play08:28

Associated here

play08:30

and the drg attachment has the drg

play08:33

transit routing table associated

play08:35

how do I associate It Is by clicking the

play08:38

clicking on edit

play08:40

the vcn attachment click on edit so go

play08:42

to Advanced options we have vcn route

play08:46

table

play08:47

second tab you'd be able to see

play08:51

that you we've Associated the drg

play08:54

transit routing table like like this

play08:56

here

play08:58

and you can also do the same

play09:01

for the NAD gateways

play09:04

um so if you click three and click you

play09:07

can associate a different route table

play09:09

that you've created so all these dot

play09:11

tables are created and Associated to

play09:13

make sure this uh the inspection Works

play09:15

in all four directions

play09:18

and let me also show you the load

play09:20

balancer that I've created

play09:24

the load balance uh is deployed in the

play09:27

public subnet

play09:29

and has the back end

play09:44

100 to 16 159 being the configured as

play09:48

the back end so uh if I use the public

play09:52

IP address

play09:59

and try to do browse that website from

play10:04

my home

play10:06

there you go the page opens up this is

play10:09

my web server running on the Oracle

play10:10

Cloud infrastructure I'm able to access

play10:12

this traffic I'm in the sub web

play10:15

application which is deployed inside the

play10:18

loaded bands behind the the workload vcn

play10:23

and I can also

play10:26

um so this is the the web server

play10:31

which is behind

play10:34

the firewall in a spoke vcn and I'm able

play10:38

to also go out to the internet using

play10:41

this all of this traffic are being

play10:43

inspected by the firewall

play10:48

and I can also reach to an on-prem

play10:52

server

play10:54

which is

play10:55

10.0.1.91 which is deployed which is

play10:59

behind my VPN ipsec VPN so

play11:03

so let's say you have a use case where

play11:05

your on-prem server which is this guy

play11:12

he's trying to access your application

play11:14

and OCA

play11:16

and I'm just trying to do a curl so that

play11:19

to show you that I'm able to browse the

play11:21

website and I'm able to see the same

play11:23

content that I'm seeing from the

play11:25

internet

play11:25

with the private IP address but then

play11:27

here over the private arbitrus I'm able

play11:29

to access the website just fine so the

play11:32

East West access is also working both

play11:34

ways

play11:35

so and now how do I you can also do a

play11:39

trace path

play11:44

you can do a trace Pro path

play11:46

to see if the traffic is going through

play11:48

the firewall

play11:50

so I'm trying to do a trace path from

play11:54

yeah see look at this so this is going

play11:57

to the

play12:00

I'm just going to the firewall and that

play12:03

gets getting routed to the drg and then

play12:05

obviously the the liver span VPN server

play12:08

that I have and the other tenancy does

play12:09

not have IC and pay allowed so that's

play12:11

why it's not completing but then you

play12:13

should be able to validate with the

play12:14

trace path if the traffic is going

play12:16

through the firewall that's one good way

play12:18

of checking it

play12:19

and the other way the most reliable way

play12:22

of checking it is going through the logs

play12:25

so I go to identity security firewall

play12:28

policies firewalls

play12:31

and then

play12:34

let's go check the logs

play12:46

so the log should up you and will should

play12:49

tell you what are the

play12:50

traffic is going through and if you want

play12:52

it to be more readable you go to explore

play12:56

with Log search

play12:57

and

play13:00

you can filter it or or

play13:05

arrange it in with

play13:09

this way source

play13:11

destination

play13:17

port

play13:20

in action

play13:26

so you should see all the traffic with

play13:29

different between different Source

play13:30

destination destination port and action

play13:33

here yeah that's how you validate if

play13:36

your configuration is working

play13:38

thank you so much I hope it helps

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
network setuphub-spoke VCNVPN configurationfirewall routingcloud infrastructureOracle Cloudon-prem connectionDRG configurationload balancernetwork validation
Benötigen Sie eine Zusammenfassung auf Englisch?