First, I am not really a network guy. Hence, I would like to validate my approach of setting up a solution, before I dive into the rabbit hole...
I have a small home office / entertainment LAN, which is used by a hand full of Mac and Windows laptops, desktops, entertainment devices, mobile phones and tablets by WLAN. The cable router (UPC Ubee EVW 3226) is working as DNS and DHCP server for the LAN. There is also a Synology NAS, mainly used as fileserver. Which I would like to reach internally and externally under the same url.
Problem now is the external IP of the router can only be reached, from external networks. Hence, I need to reach the NAS under two different IPs under the same URL depending where the laptop is located:
- When it is located in the LAN nas.example.com needs to resolve to e.g. 10.0.0.123 for the internal address.
- When it is located outside the LAN, an external DNS (e.g. Route53) has to kick in and resolve nas.example.com to the external IP of the router, which then is doing the port forwarding to the NAS.
My first guess would be to disable the DNS in the router and set up a local DNS server in the lan, which lists nas.example.com under the internal IP. And then there would be the need for an external DNS, knowing the external IP of the router, which would do the forwarding.
Will this work, given I set up a short TTL for the DNS entries to ensure not to have problems with locally cached ips? Or is there something I did not consider, which would prevent the whole setup from working?
I have an Raspberry PI 3 with Ubuntu, would this be a good enough fit for an internal DNS server? Or should I use the Synology NAS for DNS as well?