Create Custom NAT Instance in AWS VPC

From Gejoreuy
Revision as of 12:27, 14 November 2019 by Gejor (talk | contribs) (Created page with "== Purpose == Build a NAT instance using CentOS to propose internet access for private subnet in AWS VPC. <br>In this tutorial, we assume that we already have a VPC with pub...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

Build a NAT instance using CentOS to propose internet access for private subnet in AWS VPC.
In this tutorial, we assume that we already have a VPC with public and prvate subnet like belo picture.

Preparation

[root@nat-server ~]# yum update

Dissable Source/Dest. Check for the NAT Server

Configure System

In /etc/sysctl.conf enable ip forwarding :

[root@nat-server ~]# vi /etc/sysctl.conf

Add this :

# For NAT Server
net.ipv4.ip_forward = 1

Reboot now for good measure :

[root@nat-server ~]# reboot

Test our config :

[centos@nat-server ~]$ cat /proc/sys/net/ipv4/ip_forward
1