I have this Linux server in my LAN, which can be reached from anywhere using dyndns services. So when I am out, I enter
myserver.dyndns.org to get to it. When I am at home, I could do that too, but since the computer is in the same LAN, it's faster to use the internal address
But I ssh to the server using different profile bookmarks, I have the mail program on my laptop set up to use the external dyndns address to IMAP to it, and I have a cacert certificate tied to
myserver.dyndns.org - there are many cases to use the external address, even when I am at home.
So I am wondering, if I could route my connections to
myserver.dyndns.org from inside directly to
myserver.fritz.box, without going through external DNS servers.
I use an AVM Fritzbox as routing device with Firmware: FRITZ!OS 05.22, so maybe I can tell that Fritzbox to do that. I have no idea how to to it though - the docs do not help me there.
Another thought was to use the
/etc/hosts file on my laptop, to route to that IP address but this would not work when I am not at home.
So how can I do it?