Task 4: Create an Internet Gateway and Configure Route Rules
An internet gateway is an optional virtual router you can add to your VCN to enable access to your data center network.
The gateway supports connections initiated from within the VCN (egress) and connections initiated from the internet (ingress).
Security list rules control the types of traffic allowed in and out of resources in that subnet. Ensure to only permit the required types of internet traffic.
Each public subnet that needs to use the internet gateway must have a route table rule that specifies the gateway as the target.
Avoid entering confidential information in names and tags.
-
Navigate to your VCN details page.
-
In the Resources panel, select Internet Gateways.
-
Click Create Internet Gateway.
-
Enter the required information:
-
Name: Enter a descriptive name for your internet gateway.
-
Create in Compartment: Select the Sandbox compartment.
-
Enabled: Select whether you want this internet gateway to be enabled upon creation.
-
Tagging: Leave blank. This tutorial doesn't use tags.
-
-
Click Create.
-
Under Resources, click Route Tables.
-
Click the name of the default route table.
-
Scroll down to the Resources panel and click Add Route Rules.
-
On the Create Route Table Rule dialog box, enter the required information:
-
Target Type: From the menu, select Internet Gateway.
-
CIDR Block: Enter:
0.0.0.0/0
(which means that all nonintra-VCN traffic that isn't already covered by other rules in the route table will go to the target specified in this rule). -
Internet Gateway: From the menu, select the name of the Internet Gateway that you created.
-
Description: An optional description of the rule.
-
-
Click Create Route Table Rule.
Perform the next task: