Lab 10 1 AWS Virtual Private Cloud - nicolas-tullio/Tech-Journal GitHub Wiki
Deliverables
Submit Screenshot of your new VPC
Submit Screenshot of the created subnet
Submit Screenshot of the attached Internet Gateway
Submit Screenshot of the Route Table
Submit Screenshot of your Running Instance using your new VPC
Submit Screenshot of apache page loaded using Elastic IP
Screenshot of your server web page loaded using a dns name
Steps
Create a New Non-Default VPC
Open the Amazon VPC console from Services in the AWS Console
Choose Create VPC
On the configuration page
- Choose VPC and More
- Enter a name tag for your VPC in the Auto-Generate field
- Select 1 Availability Zone
- Select 1 Public Subnet
- Select 0 Private subnets
- Customize the CIDR block to be a /24
- Leave defaults for everything else
- Click Create VPC
View information about your VPC
Choose Subnets and find the subnet that was created when you created your VPC
Choose Internet Gateways and find the internet gateway that's attached to your VPC
Choose Route Tables. Select the custom route table (the Main column displays No), and then choose the Routes tab to display the route information in the details pane.
Launch an instance into your VPC
Navigate to EC2 > Instances > Launch an instance
Choose a Free-tier Eligible Ubuntu 20.04 AMI
Edit Network settings and choose the new VPC and subnet
-
Add a rule to allow inbound HTTP
-
Add a rule to allow inbound SSH
Add Name Tag
Choose Launch instance and select keypair
View Instance details
-
The Private IPs field displays the private IP address that's assigned to your instance from the range of IP addresses in your subnet.
-
You will notice that no Public IP is assigned, so you cannot SSH into the system remotely
Assign an Elastic IP address to your instance
Navigate to VPC > Elastic IPs
Choose Allocate new address, and then Allocate
Select the Elastic IP address from the list, choose Actions, and then choose Associate Address
For Resource type, ensure that Instance is selected. Choose your instance from the Instance list. Choose Associate when you're done.
- Your instance is now accessible from the internet
Configure a Web Service and Connect
SSH into your instance
ssh -i nicolas.pem [email protected]
Install Apache2
sudo apt-get install apache2
Start apache2 with systemctl
sudo systemctl start apache2
Can add/update your DuckDNS account for your new server (duckdns.org)
It can take a bit to propagate across DNS
- Try: https://dnschecker.org/
- You can put in your hostname and run tests - after a while you will see it start to propagate across the world!