Weird DNS bug - external server resolves to internal IP
- by emilecantin
I have a server that is hosted by my university. I have root access, but no control over network setup, firewall, etc. This server's DNS resolves to an internal IP here on campus (10.x.x.x), and an external IP outside campus.
I also have a few servers hosted at Amazon, and they mostly work well. However, one of them started to resolve the university server by its internal IP address. This causes problems, as 10.x.x.x on Amazon EC2 is someone else.
I have connected to the Amazon server with SSH agent forwarding a few times in the past, to access a Git repository on the university server.
Any idea what could cause this?
EDIT: Here's my /etc/resolv.conf
# Generated by dhcpcd for interface eth0
search ec2.internal
nameserver 172.16.0.23
Here's the output of dig myserver.myuniversity.ca.:
; <<>> DiG 9.8.1-P1 <<>> myserver.myuniversity.ca.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34470
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;myserver.myuniversity.ca. IN A
;; ANSWER SECTION:
myserver.myuniversity.ca. 537586 IN A 10.43.x.x
;; Query time: 2 msec
;; SERVER: 172.16.0.23#53(172.16.0.23)
;; WHEN: Wed Nov 28 16:07:21 2012
;; MSG SIZE rcvd: 60
Here's the expected output (on another Amazon server):
; <<>> DiG 9.8.1-P1 <<>> myserver.myuniversity.ca.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8045
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;myserver.myuniversity.ca. IN A
;; ANSWER SECTION:
myserver.myuniversity.ca. 601733 IN A x.x.239.1
;; Query time: 1 msec
;; SERVER: 172.16.0.23#53(172.16.0.23)
;; WHEN: Wed Nov 28 16:09:36 2012
;; MSG SIZE rcvd: 60