Introduction
This blog is in continuation of my previous article - Oracle OCI Cloud - Connecting a Private VM from a Public Bastion Host and walk through steps for creating a VM instance on Google Cloud GCP which we will use to establish VPN connectivity with Oracle Cloud - the steps for which will be outlined in next article in this series.
Here's a quick reference of configurations for this VM that we will be using in the next article while configuring VPN connectivity
VPC: gcp-oci-vpn-demo
VCN CIDR: 192.168.0.0/16
Subnet: subnet1
Region: europe-west1
Subnet CIDR: 192.168.0.0/16
VM: instance-1
Public IP: 35.210.10.232
Private IP: 192.168.0.2
Step 1: Create a VPC Network and a Custom Subnet
IMPORTANT: Make sure to pick a CIDR range not overlapping with one chosen for OCI
For this demo we create a new Custom Subnet (subnet1) in europe-west1 region and 192.168.0.0/16 CIDR range
Step 2: Create VM
Note: You can select micro VM option and leave default OS type. I used ephemeral IP but for VPN connectivity you should configure a static IP address (which survives reboots).
Note down the IPs
External (Public IP): 35.210.10.232
Private IP: 192.168.0.2
Step 3: Firewall Configuration
Note that every VPC has Implied allow egress rule that allows TCP and ICMP to all destinations (0.0.0.0/0) so you don't need to configure egress for this demo.
By default, all inbound traffic (ingress) to VM is blocked. Create a rule to allow
Go to VPC Network -> Firewall
Step 4: Router Configuration Review
Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside your Google Cloud Virtual Private Cloud (VPC) network (for example, in another VM) or outside it.
By default GCP automatically generates a default route that defines default-internet-gateway for all (0.0.0.0/0) destinations. It also defines a path for all the subnets in the VPC (in our case Subnet1 192.168.0.0/16)
Step 4: Review Router Configuration
Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside your Google Cloud Virtual Private Cloud (VPC) network (for example, in another VM) or outside it. By default GCP automatically generates a default route that defines default-internet-gateway for all (0.0.0.0/0) destinations. It also defines a path for all the subnets in the VPC (in our case Subnet1 192.168.0.0/16)Test and Verify
Activate Cloud shell and ping the public IP (it should succeed) and private IP (should fail) of the newly created VM.
No comments:
Post a Comment