Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stupid question but do I have to set my DNS to the IP of the NAS? #8

Open
jayheavner opened this issue Dec 3, 2019 · 3 comments
Open

Comments

@jayheavner
Copy link

Right now my gateway 192.168.1.1 has DNS set to 1.1.1.1. Do I need to change that to point to the IP of my NAS to get this to work?

@sgreadly
Copy link

sgreadly commented Dec 10, 2019

Yes, you need to point your gateway (and/or hosts) to the Synology's DNS Server. So if your Synology is say 192.168.1.2, then set the gateway's DNS to that, as well as your hosts if you have any statically configured. Same with DHCP server configuration on the gateway (or if you use Synology DHCP).

Think of your Synology as the main point of contact for all your DNS requests from your local hosts. It will then block said requests or forward them to the outside world as necessary.

@hwinnemo
Copy link

hwinnemo commented Mar 13, 2022

I guess I have a similar question. Or rather, would like a clarification on the same question. Here is my current setup:

  • Gateway is a router (not Synology!) -- In this case 192.168.2.1 It has it's own settings for DNS resolution provided by the internet provider. But for discussion sake, let's say they are 1.1.1.1
  • Synology is on same subnet, let's say 192.168.2.100
  • When following instructions on this git repo, the master zone ends up with 3 entries:
    • *.null.zone.file, type: A, 127.0.0.1
    • null.zone.file, type: A, 127.0.0.1
    • null.zone.file, type: NS, ns.null.zone.file
  • I assume the 127.0.0.1 is what is meant with Don't fret over this; it will be overwritten later.
  • So, this makes me think that the Synology will act as its own DNS... Or rather, it will use the actual DNS entries from Settings > Network > General > Manually configure DNS server to ultimately resolve the real IP address for a name request. That is, it ultimately sets up a DNS resolution chain like: Device > Synology > Gateway > 1.1.1.1.
  • If this is correct, it should then work to point a device on the network to the Synology IP as an DNS server and have everything work (which it does not for me)

Is the above A) as it should be; and B) a correct understanding of what should happen?

Furthermore, if the above is correct, I can see two ways to run this system:

1) Per device config

Each device configures its network settings to point to the Synology (192.168.2.100) as its primary DNS server. Advantage: Per-device flexibility. Disadvantage: Hassle to configure each device.

2) Gateway config

I would configure the gateway (192.168.2.1) to actually use the Synology (192.168.2.100) as the DNS. Since the Synology is by default configured to use the gateway as a DNS (creating an infinite loop), I would then have to configure the Synology to use the external DNS (e.g. 1.1.1.1) instead. So a DNS query would be resolved like this: Device > Gateway > Synology > 1.1.1.1). Advantage: No per-device hassle. Disadvantage: None really. If a device wanted to opt out of the Gateway > Synology redirection, it could always just configure its desired (external) DNS independently.

Let me know if I misunderstood anything. And if not, what the issue could be with the above not working on my system (currently, I have the simpler Per device config set up, as this requires the least modifications to the original system)

@hwinnemo
Copy link

hwinnemo commented Mar 13, 2022

Update

It turns out that my proposed configuration actually does work, but the one change I had to make (which doesn't seem to have been noted elsewhere) is that I had to go into the DNS Server applet on the Synology and under Resolution check Enable resolution service. From my (limited) understanding, this is what actually enables the "bridge" between Synology and the Gateway. Meaning that if the Synology doesn't have the actual answer for a DNS query, it can now forward it to its own configured DNS server (such as the Gateway or an external DNS). That was the missing link that previously didn't seem to work. Since this wasn't enabled by default (at least on my system) and is a necessary step to get the instructions to work, maybe it should be included, at least as a "check that this is enabled" bullet point.

Having said that, thanks so much for maintaining this repo. I looked at various solutions for this issue and using my existing Synology definitely seemed like the most elegant one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants