- AWS Networking Cookbook
- Satyajit Das Jhalak Modi
- 262字
- 2021-07-02 19:41:31
How to do it...
- I have created one more EC2 instance as visible in the Instances section of the EC2 console.

EC2 created for NAT
- Click on Elastic IPs in the left menu bar.

Elastic IP dashboard
- Click on Allocate new address.
Elastic IP creation page
- Click on Allocate.

Elastic IP creation success message
- Click on Close. The Elastic IP page will be visible. Choose Elastic IP and click on Actions | Associate address.
Elastic IP Action menu
- Choose Instance in the Resource type. Select Nat Instance from the Instance drop-down menu. Click on Associate. A success message is shown.
Elastic IP association with EC2 instance
- Go to the Instances menu. You can see that the public DNS and IPv4 public IP has changed. You can see Change Source/Dest. Check is true for the instance.

EC2 instance with Elastic IP
- Select Actions | Networking | Change Source/Dest. Check.

Changing Source/Dest Check for NAT instance
- You can see that Change Source/Dest. Check is now false.

NAT instance details
- We need to update the main Route Table attached to the VPC. Let's go back to the VPC dashboard and select our VPC.

VPC dashboard
- Click on the Route Tables starting with rtb.
Main Route Table
- Select the Route Table and navigate to the Routes tab. Click on the Edit button. Add 0.0.0.0/0 in the destination and the NAT instance ID in Target. Click Save.

Attach NAT in main Route Table
推薦閱讀
- GeoServer Cookbook
- Java高并發核心編程(卷2):多線程、鎖、JMM、JUC、高并發設計模式
- Mastering QGIS
- Nexus規模化Scrum框架
- Python編程實戰
- Oracle從入門到精通(第5版)
- Visual FoxPro程序設計
- Asynchronous Android Programming(Second Edition)
- Express Web Application Development
- C++從入門到精通(第5版)
- QGIS 2 Cookbook
- 硬件產品設計與開發:從原型到交付
- QPanda量子計算編程
- 零基礎學C語言(第4版)
- Learning Unreal Engine Game Development