Holger Sindbaek
Holger Sindbaek

Reputation: 2344

Elastic IP confusion

I've set up an Amazon EC2 instance with my Rails app - http://ec2-54-235-85-12.compute-1.amazonaws.com/ - and I'm associating an elastic IP - 54.235.85.12 - with it (I'm hooking on to an API where I need a static IP, since so they can whitelist that IP).

Link is working and pointing to the app, but this is what I get when I check the address for the IP:

dig +short http://ec2-54-235-85-12.compute-1.amazonaws.com 
#67.63.55.3

But if I leave out the http://, then I get the correct IP:

dig +short ec2-54-235-85-12.compute-1.amazonaws.com
#54.235.85.12

What am I doing wrong here?

Upvotes: 0

Views: 122

Answers (1)

jamieb
jamieb

Reputation: 10033

dig is a DNS tool, it doesn't make sense to specify "http://" when calling it. The erroneous result is likely due to some error when it attempts to parse the bad input. I'm not really understanding the problem here?

Upvotes: 1

Related Questions