First thing I did when I received my second hand NAS I bought a completely useless domain name to access it via the internet. Although we have a dynamic IP address I don’t bother setting up DDNS but just change the dns settings from my provider when my IP changes.
Why internal DNS?
That said, I wanted applications that work via the internet outside my home to work the same way in home. It had to, considering the WAF factor. Until now I had to use the internal IP on my network and the domain name from outside our network.
After some googling it ended up being rather simple, but there are a lot of versions out there and I thought I’d just add another one to complete the chaos we all love so much.
In time this setup will be replaced by a raspberry Pi running PiHole, but that will be in a later post.
How did I do it?
I installed the DNS server package. No need to open or forward ports since everything is inside your local network.
After installing I created a new master zone, with my domain name as domain name and host id. It automatically cointained the NS and second A record. I only created the first A record forwarding the domain name to my Synology.
The next step probably isn’t necessary, because most devices and routers can handle two or more dns servers, but I turned on the resolution service and chose the cloudflare dns service to use if my Synology doesn’t know the record a client is looking for.
Now I just had to change the dns settings in my router to look for the record on my Synology first and renew the lease on all devices so apps like DS file could also use the domain name to login when inside my home network.
A little bonus
The following adds a little bonus to the fact that you use your own dns server. The synology can cache your queries so next time you visit a website you visit before your Synology will know immediately where to send you and doesn’t have to look it up first.
The following settings work for me, but everyone uses their system differently so maybe you could do with a smaller cache or need a bigger one or you need the resources for something totally different.
There you go! You can now set up everything pointing to the same domain name and made your home network faster in the process. If you have any questions or remarks, din’t hesitate to leave them here and I will get in touch asap.
Leave a Reply