Internet Gateway - Access Public Network from Public Subnet - REQMAT BLOGSPOT
Internet Gateway - Access Public Network from Public Subnet

Internet Gateway - Access Public Network from Public Subnet

REQMAT BLOGSPOT - Nareddula Rajeev Reddy NRR
Steps:
  • Login to the aws console, https://aws.amazon.com by using credentials.
  • While logged on to the AWS portal, please go to Networking & Content Delivery
  • Then select “VPC”
  • Click “Create VPC”
  • While creating VPC, in Name Tag “Siva_VPC”and IPV4 CIDR block “10.0.0.0/16”. Then click “Yes
  • create” button.
  • Now you can able to view the Siva VPC in VPC option.
  • Then we need to create subnet for VPC, i.e. Public Subnet and Private Subnet.
  • In Under VPC dashboard, “Subnets” option is there
  • Select “Create Subnet”
  • In Name Tag “Siva_Public_Network” , VPC Select “Siva_VPC”, Availablility Zone select “1B” and IPV4 CIDR BLOCK 10.0.2.0/24.
  • Then click “Yes, Create”.
  • In Name Tag “Siva_Private_Network” , VPC Select “Siva_VPC”, Availablility Zone select “1A” and IPV4 CIDR BLOCK 10.0.1.0/24.
  • Then click “Yes, Create”.
  • Now we need to create an instance, on public network. Click Launch Instance
  • Select “AMI”
  • Select “General Purpose – t2 micro” then click “Next”
  • In Network, select “Siva_VPC”, in subnet select “Siva_Public_network” and in Auto assign Public IP “Enable”.
  • Then click “Next”
  • Leave the setting by default.
  • Then Click “Next”.
  • In Key “name” and in value “Public Instance”.
  • Then click “Next”.
  • In Assign a Security group click “Create a new security Group”
  • Security Group name: Siva_Public_Sec_Group
  • Description: Siva_Public_Sec_Group
  • Click Review and Launch.
  • Leave the settings default.
  • Click Launch.
  • While click launch, need to select the Choose an existing key pair and select the key pair as “siva_vpc” and Select the option I acknowledge.
  • Then click launch instance.
  • Now, public instance is ready and have got public IP also.
  • Now can try to RDP for 13.127.108.90 IP.

Internet Gateway
  • Go to VPC Dashboard, we can able to see an Internet Gateways option.
  • Click the Internet Gateways in VPC Dashboard,
  • Click “create Internet Gateway”.
  • In Name Tag, Type “Siva IGW”.
  • Then click “Yes, Create”.
  • We can able to see “Siva IGW” option. But it is detached mode.
  • We need to attach VPC into that i.e. Siva_VPC.
  • In Attach to VPC, Siva_VPC is selected,
  • Click Yes, Attach button.
  • We need to create route table for Public subnet. In Name tag “Siva_Public_route_table”. Then select
  • VPC as “Siva VPC”.
  • Click “yes, create”.
  • By default, 10.0.0.0/16 subnet route only available.
  • Click Edit option in route table.
  • Then click “add another route”.
  • In Public route table, add default route 0.0.0.0/0 with next hop address as igw (internet gateway).
  • Then Click “Save”.
  • In Subnet associations, click edit option.
  • In Edit option, select “Siva_Public_network”.
  • Then click save.
  • Now you Can try to connect internet.
Note: Make sure to have details like names, tags, description, permissions, ports, CIDR etc. as per your needs and requirements. Private IPs depends on CIDR taken.

AWS VPC | Internet Gateway - Access Public Network from Public Subnet


Share with your family and/or friends