0

Given a server "example.com" at 10.0.0.1,[ipv6] with a CNAME *.example.com > example.com And a second server "staging.example.com" at 10.0.0.2/[ipv6]

if staging tries to SSH to "example2.com" (with ipv6) and that this domain doesn't have any AAAA field, SSH tries to resolve example2.com.example.com. As it is included in the CNAME > example.com so example2.com will be resolved as the ipv6 of example.com which is completely wrong.

How could I avoid that ?

In a more concrete way, git clone git@github.com:user/repo.git on staging.example.com resolves github.com as the IPv6 of example.com so I'm unable to do anything.

I'm using a clean installation of Ubuntu 12.04.

Soulou
  • 1
  • 1
    `How could I avoid that?` - Remove the `search example.com` line from your /etc/resolv.conf? Include the trailing dot '.' when type a hostname/domainname? – Zoredache Sep 11 '13 at 23:50
  • read it ten times, only `example2.com.example.com.` was the part i understood :D – GioMac Sep 11 '13 at 23:51
  • Problem solved. I has to add `search local` in my /etc/resolv.conf By this way, there is no more recursive searches using the fqdn (example.com) – Soulou Sep 12 '13 at 00:07

1 Answers1

2

Remove your domain name from the search line in /etc/resolv.conf.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972