AWS Classroomnotes 11/Aug/2022

AWS CLI for Networking

  • Create a vpc and attach internet gateway
# Create VPC
aws ec2 create-vpc --cidr-block "192.168.0.0/23" `
    --tag-specifications "ResourceType=vpc,Tags=[{Key=Name,Value=activity1}]"
# vpc-055037a4a184bf027


# Create internet gateway
aws ec2 create-internet-gateway `
    --tag-specifications "ResourceType=internet-gateway,Tags=[{Key=Name,Value=activity1}]"
# igw-0c2ff11b082892e37

# attach internet gateway
aws ec2 attach-internet-gateway `
    --vpc-id "vpc-055037a4a184bf027" `
    --internet-gateway-id "igw-0c2ff11b082892e37"
  • Create two subnets: Refer Here for the changes done
  • Create a public route table and associate with public subnet. Add a route to internet gateway
  • Create a private route table and associate with private rt
    Refer Here
  • Create a security group that opens 80 and 22 port from anywhere for public usage and a securtiy group which opens all ports within vpc.
  • Refer Here for the changes to add security groups

Exercise

  • Create a Network ACL which opens all 22 and 80 port from anywhere, all connections within vpc and denies the rest. attach this to public subnet
  • Create a Network ACL which opens all connections within vpc and attach this to private subnet
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%