0

I need a server on the network which has direct public IP address, not behind NAT.

I’d like to use Amazon EC2 for this due to its flexibility and my familiarity with it.

But as far as I can read so far, all current AWS accounts can fire up Amazon EC2 instances only inside VPC’s (Virtual Private Cloud) with NAT gateways, there is no longer an option to fire up “Classic EC2” where the instance has direct public IP address assigned to it.

I looked at Elastic IP’s and Elastic Network Interfaces, but apparently all they provide is some control over the public IP allocation, it still gets NAT’ed to the instance itself.

Is there any way to achieve what I need or should I look for another hosting solution?

1 Answer 1

1

You ask this:

Is there any way to achieve what I need or should I look for another hosting solution?

I’m afraid you can’t do that with Amazon EC2 anymore. Here is an excerpt from their page on “Amazon EC2 Instance IP Addressing”; bold emphasis is mind:

You can't manually disassociate the public IP address from your instance after launch. Instead, it's automatically released in certain cases, after which you cannot reuse it. For more information, see Public IP Addresses and External DNS Hostnames. If you require a persistent public IP address that you can associate or disassociate at will, assign an Elastic IP address to the instance after launch instead. For more information, see Elastic IP Addresses.

Which all basically means that the Amazon EC2 pool is ultimately all NAT-ed and all connections are done via DHCP and the only way to get a static—or as they describe it “persistent”—IP address is via their Elastic IP address service.

For more details on Elastic IP addresses and VPC usage, check out this document.

5
  • Thanks @JakeGould. I suppose that's the answer I was hoping not to hear ;). I'm not quiet concerned about the persistent IP address but more about having completely free flow of network traffic to the server. I only tried EIP in hope that it can let me avoid the NAT. After writing this question I realised that I manage to get the traffic flow I want on my NAT'ed laptop at home too. There is something in the way that the Internet Gateway works which blocks the traffic I want. Sep 12, 2015 at 23:59
  • no that's not my concern. Security is not an issue while I'm experimenting. For instance - I'm experimenting with tools like tcptraceroute and see that on my laptop I can get response from all the hops between me and, for instance, google.com port 80, but tcptraceroute on an EC2 server miss many hops. I suspect that this is due to the Internet Gateway. Sep 13, 2015 at 0:10
  • correct (except that on my Ubuntu server missing hops are represented by "*" per each unanswered probe). Sep 13, 2015 at 0:20
  • BTW - I'm reading about GCE and see that they provide an option of "protocol forwarding", which sounds like what I might use if their standard load balancer isn't enough: cloud.google.com/compute/docs/protocol-forwarding Sep 13, 2015 at 0:21
  • 1
    @AmosShapira missing hops on a traceroute do not mean anything is being filtered. You are seeing a problem where no problem exists, or you are misdiagnosing the issue, if there is an issue. The Internet Gateway object doesn't block traffic. Also, EC2 classic instances were also natted in the same way. The machine itself only had a private address. You should explain what traffic you want that you think is being blocked. Sep 13, 2015 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .