How to connect to outside world from amazon vpc?

后端 未结 11 1178
甜味超标
甜味超标 2020-12-22 15:38

I have amazon VPC set through wizard as \"public only network\", so all my instances are in public subnet.

Instances within VPC that have Elastic IP assigned connect

相关标签:
11条回答
  • 2020-12-22 16:11

    All that needs to be done to fix this problem, is to disable "source/destination check" for the instance you have configured to do NAT. This can be done in the AWS console, under "Instance Actions".

    Reference

    0 讨论(0)
  • 2020-12-22 16:16

    Or create a NAT Instance within the public VPC and add a static route to that NAT instance

    route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.0.5 eth0

    where 10.0.0.5 is your nat instance, just make sure your the security group which contains the NAT instance can accept internal traffic from the boxes you require internet access

    0 讨论(0)
  • 2020-12-22 16:17

    The docs tell you should add a NAT Instance

    0 讨论(0)
  • 2020-12-22 16:23

    Did you check the Network ACL on the subnet?

    Cross check the security groups for rules.

    The route table looks fine. It should work.

    0 讨论(0)
  • 2020-12-22 16:23

    Security Groups -> Outbound

    *   ALL Traffic ALL     ALL     0.0.0.0/0   Allow
    

    Please allow Outbound, if you want to connect to external servers like google.com or even want to update- sudo apt-get update

    You can allow the outbound using AWS front-end goto Security Groups -> Outbound

    Make sure you select the right group for your AWS instance

    0 讨论(0)
  • 2020-12-22 16:24

    Instances without EIPs can access the Internet in one of two ways Instances without EIPs can route their traffic through a NAT instance to access the Internet. These instances use the EIP of the NAT instance to traverse the Internet. The NAT instance allows outbound communication but doesn’t enable machines on the Internet to initiate a connection to the privately addressed machines using NAT.

    https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html

    0 讨论(0)
提交回复
热议问题