Question: This is a problem which is driving me crazy lately.

I use dynamic DNS to connect to a home server. Let's call the dynamic host `my.home.net`. I use ddclient to update the DNS record every few minutes, then I access my machine over SSH. Pretty standard. That works great when I am out and about, but I cannot access my server using the dynamic host address when I am inside my home network.

The upshot of this is that I often find myself configuring everything twice. For example I have git repos on my server and I end up adding two remotes, one for external access via `my.home.net` and another for internal access via local IP address.

This is annoying, so I hope to fix it. Something tells me this is the fault of my DSL router's DNS implementation, but I am not sure. I have prodded around in the router setting and I don't see anything that could help.

Has anyone had the same issue? Do you know a workaround/fix?

Thanks!

Answer: 
Routers typically don't route back to the internal servers. If you have a server running DD-WRT or a similar O/S you may be able to enable hairpin routing to do this. Your router may allow you to configure routeback which enables hairpinning. 

Your router is likely forwarding the DNS request out to your dynamic DNS provider. Some routers allow you to configure local entries, in which case you configure the domain you connect to with the internal IP address of your server. 

I generally run an internal DNS server which serves up the real (internal) IP address of my servers. `bind` is likely overkill and I often use `dnsmasq` which is easy to setup and run on Linux/Unix platforms. There are similar options for Windows. The DNS settings on the router should be updated to use this server rather than the default one. DHCP can be configured to specify the internal DNS server as the default.
I had a similar problem accessing my home server from within my own network. My router apparently refused connection from any source with its own IP address. I solved it by using a VPN (In my case, Private Internet Access). When I had the VPN active, I was able to access my home server via the DNS name.