Routing: Resolve dynDNS hostname internally to local ip

1.6k Views Asked by At

is the following problem easy to solve?

I've got some git repos and added a remote. From outside there is a repository address [email protected]/~/git/ ...

From inside it is [email protected]/~/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!

1

There are 1 best solutions below

5
On BEST ANSWER

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.