Add host entry

Currently reading
Add host entry

DS920+, DS918+, DS214+, DS211j
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
  2. iOS
Last edited:

Possible very basic question and I know how to do this on my Linux firewall and on Windows 10, too, however, not within DSM.

I've two DNS servers running in my LAN: the primary one is installed on my Synology NAS and is mainly responsible for the Windows clients that authenticate against a Synology Directory Server and a second DNS server running on my firewall. The Firewall is acting as a DHCP-server, too, and publishes the primary and secondary DNS-server to the clients.

I've added a new host entry on my firewall so I can reach an internal server with an external domain name and obviously w/o leaving the LAN. So I've added to the host file.

If the name resolution works correctly and as expected, I noticed that resolves into the local IP-address, e.g

Unfortunately, this works only from time to time and I guess most of the time it does not work is due to the DNS resolution made from my Synology NAS.
Because at the time it does not run as expected, I get the external IP-Address of the domain name.

Background: I'm running a server on my LAN that can be reached by using an external domain name and a reverse proxy's port forwarding. For some reasons I do not want to the LAN clients to access this local server with an external name resolution.

So long story short: how can I add a similar host entry on my Synology for those clients that primarily use the Syno's DNS server?

FWIW: the NAS is not accessible from external but it can access the internet...

Have you tried adding a new master zone on the NAS's DNS Server that covers [I haven't looked at this...] Or a forwarding zone on the NAS DNS going to the firewall's DNS?

I assume you have created both DNS Servers as master zones for the same domain, rather than having one server being the master and the other being slave and updated from the master.
Good question. Right now, the DNS of my Synology is configured as primary DNS and the firewall's DNS as secondary. Both configured in the firewall's DHCP server.

So this leaves the question: how to configure both DNS as master on my Synology, guess this is what you meant before, right?
That's not quite what I meant. DHCP can provide a list of DNS servers to the DHCP clients, generally primary, secondary, etc. What I was meaning is that the zone within the DNS server is either a master zone (i.e. owns the zone and is where the records are defined) or a slave zone (which maintains a copy of the master zone, so stops all resolution request having to be sent to the master DNS).

It sounds that you are manually maintaining the zones on each DNS server. Then the DHCP server is telling DHCP clients to use both, but the firewall's DNS server is to be used first.

I've only used DNS Server on DSM and SRM so my understanding of doing this on other implementation is limited. Within DNS Server you create master zones for domains and this means that any requests for these domains get resolved here, for other domains the server will forward the request to the other configured DNS servers.

What I was asking is if you have created a new zone that handles on the DSM DNS Server? If you haven't then requests will get sent to the forwarding servers.
Guess I solved this puzzle :)

I've added a master zone on Synology's DNS-Server by using the external domain name and used the IP-address of my firewall as the DNS server address. FWIW: the second DNS server is running on the firewall.

After saving the new master zone, I've added a ressource entry of type A using a FQDN pointing to the correct server. I've used ffsync [] in this case.

I had to do some more homework but not on any Synology devices to get the final result but nevertheless it works now as expected!

Thanks to all for reading and especially to @fredbert for pointing me into the right direction!

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads