You can launch an instance in a subnet of your Virtual Private Cloud (VPC) using an official Outscale machine image (OMI) configured for Network Address Translation (NAT). This enables your instances to indirectly connect to the Internet through this NAT instance.

Before you begin: Set up a VPC architecture with one or more subnets. For more information, see Creating a VPC Platform.

 

  1. Launch an instance in a subnet of your VPC using the official NAT instance OMI (named NAT instance). For more information, see Creating / Launching Instances.

    You can add a Name tag to this instance to indicate that this is a NAT instance. For more information, see Adding or Removing Tags.

    You can choose any instance type.


  2. Enable this instance to directly connect to the Internet using an Internet gateway and an External IP address (EIP). For more information, see Tutorial: Setting Up a Direct Connection Between Instances in a VPC and the Internet.

    This EIP is the public IP address used by the NAT instance to connect to the Internet through the Internet gateway on behalf of your other instances. For more information, see About Internet Gateways



  3. To enable NAT instance for the NAT instance, set its sourceDestCheck attribute to false. For more information, see Modifying an Instance Attribute.

  4. In the security group of the NAT instance, add rules to the security group of your NAT instance allowing inbound flows of your choice coming from the security groups of the instances you want to connect to the Internet to allow flows coming from these instances to reach the NAT instance. For more information, see Adding Rules to a Security Group.

  5. To allow and route flows from these instances to the Internet through the NAT instance:
    1. Add a rule in their security groups allowing outbound flows to the Internet (0.0.0.0/0 CIDR block or a smaller range of IP addresses)
    2. Create a route in the route tables of their subnets with 0.0.0.0/0 (or a smaller range of IP addresses) as destination and the ID of the NAT instance as target. For more information, see Creating a Route.

    Instances you launch in the appropriate subnets can access to and be accessed from the Internet using the NAT instance.