Normally, EC2 public DNS names will resolve to internal IPs from within an EC2 region. However from one EC2 instance, we're seeing these always resolve to public IPs. We have confirmed that it is using the same amazon nameserver as other instances:
This is what we're seeing:
ubuntu@ip-10-203-XXX-XXX:~$ dig A ec2-184-73-XXX-XXX.compute-1.amazonaws.com ; <<>> DiG 9.8.1-P1 <<>> A ec2-184-73-XXX-XXX.compute-1.amazonaws.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44851 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;ec2-184-73-XXX-XXX.compute-1.amazonaws.com. IN A ;; ANSWER SECTION: ec2-184-73-XXX-XXX.compute-1.amazonaws.com. 603721 IN A 184.73.XXX.XXX ;; Query time: 0 msec ;; SERVER: 172.16.0.23#53(172.16.0.23) ;; WHEN: Fri Jun 7 17:45:58 2013 ;; MSG SIZE rcvd: 76
Why would this not be resolving to the internal IP?