title: Unable to get AWS NAT gateway working for API with IP whitelist
body: <p>Our aim is to get our Elastic Beanstalk setups to route traffic through a NAT gateway as we require for certain traffic connecting to API's which require IP whitelisting. Rather than make modifications to the current setup, I have created a separate/isolated VPC &amp; EC2 instance to familiarise and test the setup. However I am yet to get the setup working as desired.</p>
  
  <p><strong>Here is the setup</strong></p>
  
  <ul>
  <li>VPC (vpc-77049811) with CIDR of 10.0.0.0/16</li>
  <li>Internet gateway (igw-4d4b212a) assigned to mentioned VPC</li>
  <li>Subnet (subnet-096d8a53) with CIDR of 10.0.1.0/24 </li>
  <li>NAT Gateway (nat-00bb49204627de7e6) attached to mentioned subnet and assigned Elastic IP</li>
  <li>Route table attached to mentioned VPC and associate with mentioned subnet</li>
  <li>1x EC2 Instance assigned to VPC and its own Elastic IP and Disabled Source/Destination Check</li>
  </ul>
  
  <p><strong>Route Table Setup</strong></p>
  
  <pre><code>10.0.0.0/16     local
  0.0.0.0/0       igw-4d4b212a
  </code></pre>
  
  <p>With the above setup, and am able to log into the server and make a curl request to get the servers public IP address (curl icanhazip.com). As soon as I add a rule to the route table for the url's resolved IP's to route through the NAT gateway though, I am unable to ping or request the curl request as it will timeout.</p>
  
  <p><strong>Rules added to route table which do not work</strong></p>
  
  <pre><code>45.63.64.111/32     nat-00bb49204627de7e6
  144.202.71.30/32    nat-00bb49204627de7e6
  </code></pre>
  
  <p>Not sure if I've overlooked something here or maybe I have misunderstood the concept and use cases for the NAT gateway?</p>