November 2, 2019

Playing with Subnets on AWS

Creation of VPCs

  • create vpc with IPv4 CIDR block 10.0.0.0/24 (https://cidr.xyz/)
    • vpc-0e398b74ccccfb7c0
  • create public subnet with IPv4 CIDR block 10.0.1.0/16
    • AZ 1c
    • ips available: 256 - 5 = 251
  • create private subnet with IPv4 CIDR block 10.0.2.0/16
    • AZ 1c
    • ips available: 256 - 5 = 251
  • create internet gateway for the vpc
  • create new public route table
  • create bastion host in public subnet
    • create ec2 instance
    • request public ip
    • create new security group
  • create db host on private subnet
  • use ssh agent forwarding (ssh -A) to access the db host via the bastion host
  • create NAT gateway to allow instances in private subnet to access the internet
    • create a EIP for the NAT Gateway
    • NAT Gateways take some time to start up