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

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.

  • 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. – Amos Shapira Sep 12 '15 at 23:59
  • @AmosShapira “…free flow of network traffic to the server.” So your concern is the VPC internal address and your inability to “lock it down” between instance on that internal interface? – JakeGould Sep 13 '15 at 0:06
  • 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. – Amos Shapira Sep 13 '15 at 0:10
  • @AmosShapira You mean hops that don’t respond with an IP like ??? with blank results and such? – JakeGould Sep 13 '15 at 0:18
  • 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. – Michael - sqlbot Sep 13 '15 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.