I've successfully configured DynDNS in my router and now I'm able to reach my home server from outside my local network using my custom domain.
Using the very same domain I'm able to reach my home server from inside the local network, despite having an external IP, so I assume my router allows NAT loopback for that domain.
I was thinking that this was enough to ensures that network traffic stays within the local network for the requests to my home server.
But I made a simple test that seems to disprove that.
I changed the /etc/hosts file of my laptop ( connected to the local network ) to resolve my DynDNS domain as the local IP of my server ( e.g. 192.168.1.2 )
Network speed is much faster using the local IP for every request. I assume is because the request is not going outside the local network.
My laptop is not the only device that will use the server. Furthermore changing back and forth the hosts file inside/outside my network is not a viable option. What I don't really get is why the router is not "smart" enough to reroute the requests
Am I missing something?
The only way to resolve this is deploying a DNS server in my local network?