Plainsurf Solutions

Creating a VPC in AWS: Simplified Setup for Secure Networking

Introduction

Welcome to our comprehensive guide on Creating a VPC in AWS: Simplified Setup for Secure Networking. In this tutorial, we will walk you through the step-by-step process of setting up your own VPC for secure and isolated networking in the AWS cloud. You will gain a solid understanding of VPC concepts, such as subnets, route tables, and internet gateways. Let’s dive in!

VPC – What is AWS Virtual Private Cloud?

Virtual Private Cloud or VPC  is similar to a private cloud but is created within a virtual environment on the AWS platform. It offers similar capabilities and functionality as a private cloud, It allows us to have control over all network resources.

A VPC is always created within a specific AWS region. It provides isolated and secure networking capabilities within the chosen region. Within a VPC, users can create and configure subnets, which are subdivisions of the VPC means sub networks that exist within specific Availability Zones.

Availability Zones are different places where AWS have physical resources which is in AWS region, designed to provide high availability and fault tolerance. Each Availability Zone typically have one or more data centers. Subnets – so Subnets are logical divisions within a VPC that allow users to differentiate and manage their resources.

When creating subnets within a VPC, they are created or attached to specific Availability Zones. This means that you cannot create the same subnet in different Availability Zones. Each subnet resides within a specific Availability Zone and provides network connectivity for resources Which are deployed in that zone.

So Basically a Virtual Private Cloud – VPC on AWS is a virtualized networking environment that offers similar functionality as a private cloud. It is created and associated with a specific AWS region and it allows users to create and manage subnets within individual Availability Zones and also in one availability zone we can create multiple subnets its possible.

How to Create a AWS VPC with a Subnet, Route Table, and Internet Gateway Here are the Steps:

Step 1:

  • The first step to create a VPC is obviously go to your AWS Management Console and Search field search for VPC

  •  then click on the VPC service now you will be able to see the VPC dashboard

  •  Now Click on your VPCs and here you will see a default VPC which is created automatically when your account is created

  • Now click on Create VPC button and you have to Give your VPC a name and IPv4 cidr block which we are going to give a Class A private cidr which is 10.0.0.0/16

  • and then click on Create VPC

Step 2: Our next step is to create a Subnet under this VPC

  • Click on Subnets then click on Create Subnet

  • Here you have to select vpc in which this subnet will be made so select the VPC which we recently created
  • Then we have to give this subnet a Name and below you can select availability zone in which you have to make this subnet or by default amazon will choose any AZ.
  • Give CIDR block a range of network which we are giving as 10.0.0.0/24 this /24 is because of subnetting this is a Different Concept.

Click on Create subnet now your subnet is created.

Step 3: Next step is to create Internet Gateway and Attach it to the VPC

  • Click on Internet Gateways 
  • Then click on Create Internet Gateway Button 
  • Give name to your Internet Gateway and click on Create internet gateway button below
  • Your internet Gateway is now created
  • Now click on Actions button and Attach this internet gateway to the VPC we created recently.

Step 4: Next step is to create a route table for our Subnet so if any instance will be created in this subnet will use these specified routes to go to the internet and access internet

  • Click on Route Tables
  • Click on Create Route Table
  • Here give a name to your route table and then below Select VPC which we created earlier and then click on Create Route table

  • Your route table is created now we have to associate a subnet to this Route Table 
  • Click on Subnet Association
  • Click on edit subnet Association and here select our created subnet

  • click on Save association button 
  • now our subnet is associated with this Route Table but one more thing to do here is add a route to internet gateway so any instance created in this subnet can go to the internet
  • so in Routes click on the Edit Routes
  • click on Add routes
  • on Destination side select 0.0.0.0/0 which is for ‘go to internet with this route’
  • In Target side, select Internet Gateway and our created Gateway will appear here and Select that
  • click on Save Changes Button and you successfully added internet gateway route to your Route Table.
  • Now you can create a instance in this VPC and in our created Subnet where this will give you selected private ip from the range which we specified in subnet CIDR.

Checkout our other Blogs :

Blocking Specific Countries with Nginx using GeoIP :- https://plainsurf.com/blocking-specific-countries-with-nginx-using-geoip/

The Ultimate Guide to Ngnix wp Setup :- https://plainsurf.com/the-ultimate-guide-to-ngnix-wp-setup/