PRACTICAL
1. Create VPC
For creating VPC we have 4 configurations
VPC with a Single Public Subnet: The configuration for this scenario includes a virtual private cloud (VPC) with a single public subnet, and an Internet gateway to enable communication over the Internet.
VPC with Public and Private Subnets: The configuration for this scenario includes a virtual private cloud (VPC) with a public subnet and a private subnet. (note: A common example is a multi-tier website, with the web servers in a public subnet and the database servers in a private subnet)
VPC with Public and Private Subnets and Hardware VPN Access: The configuration for this scenario includes a virtual private cloud (VPC) with a public subnet and a private subnet, and a virtual private gateway to enable communication with your own network over an IPsec VPN tunnel. (note: This scenario enables you to run a multi-tiered application with a scalable web front end in a public subnet, and to house your data in a private subnet that is connected to your network by an IPsec VPN connection).
(note: IPSec is an Internet Engineering Task Force (IETF) standard suite of protocols that provides data authentication, integrity, and confidentiality as data is transferred between communication points across IP networks. IPSec provides data security at the IP packet level.)
4. VPC with a Private Subnet Only and Hardware VPN Access: The configuration for this scenario includes a virtual private cloud (VPC) with a single private subnet, and a virtual private gateway to enable communication with your own network over an IPsec VPN tunne
(note: we are going to create the subnet from very basics)
2. Create subnet
3. Spinning an EC2 instance
(note: Now the subnet that we have created is a private subnet so we won’t be able to access internet)
4. Creating a route table
(note: when we create a VPC a route table will be created automatically, by using the existing route table it won’t be able to access internet)
(note: by using route table we can manage internal traffic)
5. Internet Gateway
(note: Even if we create an internet gateway it doesn’t give you an access to internet, either you need to elastic load balancer or elastic ip)
6. Elastic IP
7. Spin a new instance
8. Associate elastic ip
9. Connect to the instance
(note: here when we check the ip it is the private instance)
10. Login to private instance
(note: i -> identity file)
11. Try to install a package
(note: here package won’t be installed, now we are going to use, by using NAT it is possible to access network from private instance but not possible to access the instance publicly).
12. Creating NAT gateway
13. Login to instance
(Note: it should work)
(Note: public subnet -> public route table -> igw, private subnet -> private route table -> nat, we are creating NAT in public instance and attaching to private instance).
14. VPC Peering
15. Network ACLs
(note: NetworkACL is primary form of security. It does the same activity of SG, but multiple SG can be under ACL)
(note: Deny will override allow)
16. Endpoint
Last updated
Was this helpful?