Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Are you using the FQDN in all cases? That'd be my first thought - not using the FQDN + domain suffixing on your connection. –  HopelessN00b Nov 28 '12 at 15:39
    
What does the content of the /etc/resolv.conf file looks like on that server? –  Alex Nov 28 '12 at 15:39
    
That's what I thought at first, but I didn't touch it: # Generated by dhcpcd for interface eth0 search ec2.internal nameserver 172.16.0.23 –  emilecantin Nov 28 '12 at 15:48
    
I can't seem to format my previous comment... –  emilecantin Nov 28 '12 at 15:50
    
Yeah, markdown-ate-your-baby. Having said that, you should edit the contents of /etc/resolv.conf into your answer anyway, where the markdown's a little less... awful. –  HopelessN00b Nov 28 '12 at 16:03

1 Answer 1

You can fix the IP address of your university server inside Amazon servers by changing /etc/hosts. Windows has the same file as i remember It's a simple solution because it's not clear what's DNS Server of your DOMAIN

share|improve this answer
    
Yes, but other servers resolve the external IP just fine... –  emilecantin Nov 28 '12 at 15:50
    
what is DNS of your domain? I mean who will be queried by external DNS's to resolve your IP address? –  Mehdi Nov 28 '12 at 15:55
    
Bad idea. The OP should fix the problem, not work around it. –  bortzmeyer Nov 28 '12 at 20:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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