1

is the following problem easy to solve?

I've got some git repos and added a remote. From outside there is a repository address git@my.externhostname.com/~/git/ ...

From inside it is git@192.168.1.10/~/git

is there any way to configure it dynamically, i.e. when I am within my personal network I want to resolve the adress my.externhostname.com to above mentioned ip.

But if the address isn't reachable (I am outside the network) I want to use a basic DNS server to resolve it.

Any ideas?

Thanks a lot!

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
John Rumpel
  • 4,535
  • 5
  • 34
  • 48

1 Answers1

2

You need to configure a split DNS which pretends to own the zone for externhostname.com if it responds to queries on the ethernet interface going to 192.168.1.10. In other words, if you are on the private network, your DNS should never forward to DynDNS.com.

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
  • Well, I think I understand. Its a continuous check&update DNS service. But I don't see an easy integration onto a windows-platform,right? – John Rumpel May 21 '12 at 15:11
  • Are you saying you're running a Microsoft Windows DNS on the LAN that is hosting 192.168.1.10? – Mike Pennington May 21 '12 at 15:12
  • I am not running a Windows DNS. But the problem is related to exactly one machine with this ip. It's a notebook. And it is not that nice to add all the time two git remotes to a repo. – John Rumpel May 21 '12 at 15:31
  • Your machine that hosts the git repo should not need to be involved in the DNS resolution issues. If you're running a `bind`-based DNS, then the configuration for this is not overly complicated, assuming you've worked with `bind` in the past. Be sure you always leave the machine with the git repo on `192.168.1.10`... otherwise it could break the assumptions behind what we're talking about. – Mike Pennington May 21 '12 at 15:37
  • I've never worked with and first look show the effort is too expensive for such a small problematic case :/ Nevertheless thanks for your hints to cope with. – John Rumpel May 21 '12 at 16:35