- Lab
- A Cloud Guru
Deploying Network Address Translation (NAT) Gateway
In this lab, you will be deploying a NAT gateway into the public-facing subnet of the solution. Once implemented, you will test connectivity using an EC2 instance. NAT gateways allow communication to the internet without the sending device requiring a public IP address. Not having a public IP address prevents any communication from the internet into the endpoint. It is expected you will be familiar with the AWS console to complete this lab and have an understanding of networks and routing.
Path Info
Table of Contents
-
Challenge
Create a NAT Gateway in the Public Subnet
In this objective, we will be deploying a NAT gateway called VPC1NGW in the public subnet of our VPC.
Use the following settings for this objective:
Name = VPC1NGW Subnet = FirstVPCPublic1UsEast1a-10-0-0-0-24 Connectivity type = Public Elastic IP allocation ID = Allocate Elastic IP
-
Challenge
Modify the Private Route Table So 0.0.0.0/0 Targets the NAT Gateway
In this objective, we will be adding a new route to the private route table, so all traffic not destined for the VPC is sent out to the NAT gateway.
Use the following settings for this objective:
Destination = 0.0.0.0/0 Target = NAT Gateway - VPC1NGW
-
Challenge
Test Internet Connectivity from the Private Instance
Now that the NAT gateway has been created and the route table updated, in this objective you will be confirming connectivity to the internet.
Using AWS System Manager - Fleet Manager, open a session to EC2Instance1.
Use the command below to check the IP address EC2Instance1 is using for internet communication:
curl ifconfig.me
Check the returned response is the public IP of the VPC1NGW NAT gateway.
Test connectivity with an Internet webpage using the
curl
command.Example command:-
curl https://www.bbc.co.uk
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.