0

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
7
  • Are you using the FQDN in all cases? That'd be my first thought - not using the FQDN + domain suffixing on your connection. Nov 28, 2012 at 15:39
  • What does the content of the /etc/resolv.conf file looks like on that server?
    – Alex
    Nov 28, 2012 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 Nov 28, 2012 at 15:48
  • I can't seem to format my previous comment... Nov 28, 2012 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. Nov 28, 2012 at 16:03

1 Answer 1

-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

3
  • Yes, but other servers resolve the external IP just fine... Nov 28, 2012 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, 2012 at 15:55
  • Bad idea. The OP should fix the problem, not work around it.
    – bortzmeyer
    Nov 28, 2012 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .