Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Next DNS on the NAS?

713
234
NAS
DS918+
Operating system
  1. macOS
Mobile operating system
  1. iOS
I've started using NextDNS as a DNS service on all my devices, Apple Mac, iPads, iPhones, browsers etc.

The next logical step would be to set the NAS to use it as a DNS service. At the moment obn the NAS I have things set as:

Preferred DNS server: xxx.xxx.xx.xxx (my router)
Alternative DNS server: 8.8.8.8

I had thought it'd be simple enough to set both of these to use the Next DNS servers of: 45.90.28.192 and 45.90.30.192

However I found this page which used curl etc to install something. Anyone have any ideas as to what this actually does and whether this is a preferred option / method?

Any thoughts appreciated.
 
Couldn’t be simpler. Log in to your NAS using SSH, run the curl command in the nextdns wiki page you linked to and then point your router lan DNS address to the IP address of your Synology NAS. The curl command installs NextDNS CLI which securely connects to the NextDNS servers, caches your DNS results and basically does everything for you. You will need your NextDNS configuration ID which is ‘c’ followed by a series of digits. When you install NextDNS CLI it will ask you for this.

Doing it this way means every device on your home network will use NextDNS.

You will no longer need to setup DNS addresses on all your devices, they should receive your Synology address automatically when set to DHCP.
 
Right, understood. I'm still trying to work out in the Orbi router where I'd alter the DNS as the Orbi manages the DNS?

Screenshot 2024-10-29 at 10.50.03.webp
 
Somewhere in the DHCP settings for your LAN there should be an option to specify a DNS address. It has to be there. DHCP includes not only IP address allocation but also DNS address allocation. No router has a hard-wired DNS address with no possibility to change it.

Here are the settings on my TP-Link ER605. My Synology NAS address is the 192.168.86.24, hence it is also the DNS address. Be aware that the WAN DNS address is different and on my system remains unchanged. I have FTTP (Fibre To The Premises):

Xnip2024-10-29_11-24-02.webp
 
Last edited:
Ah ha it wasn't where I thought it would be. So in the attached screen I'd change out the 1.1.1.1 (Cloudflare) address to point at the NAS static IP address, and blank out the other IPs?
Screenshot 2024-10-29 at 15.09.26.webp


It looks like I managed to get the service installed:

Screenshot 2024-10-29 at 15.26.10.webp
I set things as:

Sending your devices name lets you filter analytics and logs by device.
Report device name? [Y|n]: y
Make NextDNS CLI cache responses. This improves latency and reduces the amount
of queries sent to NextDNS.
Note that enabling this feature will disable dnsmasq for DNS to avoid double
caching.
Enable caching? (y/n): y
Instant refresh will force low TTL on responses sent to clients so they rely
on CLI DNS cache. This will allow changes on your NextDNS config to be applied
on your LAN hosts without having to wait for their cache to expire.
Enable instant refresh? (y/n): y
NextDNS installed and started using systemd init
Congratulations! NextDNS is now installed.
 
Last edited:
You only need your Synology server’s address in the Primary DNS field. The rest should remain empty. If you go to NextDNS in a browser and log in, the ‘Setup’ tab should say:

All good!
This device is using NextDNS with this profile.

Are you seeing the correct device names in the NextDNS web pages? I edited the /etc/hosts file on my NAS so I could add all my devices by name with their IP addresses. I added them after the existing contents in this form:

192.168.86.1 Router
192.168.86.2 AmplifiHD
192.168.86.3 AmplifiHD_Bedroom
192.168.86.5 AmplifiHD_Study
192.168.86.6 Echo-White
192.168.86.7 Echo-Dot-White

and so on. Next DNS CLI will look at this file to identify devices if they’re not available elsewhere. I use Nano to edit files on my NAS - it is installed in the SynoCli File Tools package from the SynoCommunity repository. Details here: SynoCommunity

If you’re seeing your device names correctly there’s no need to do anything with /etc/hosts
 
Indeed it looks like it is all working nicely now. The setup tab in the browser said that anyway as I'd set the Secure DNS URL to point at Next DNS.

Most of the devices I use are Apple and controlled via Apple device profiles. The only other device showing up is the Orbi router which strangely enough identifies itself as Device #7QROR.



Hmm it looks like it'll be a good idea for me to edit the hosts file too. Sigh I thought this would all be very simple, but it seems this rabbit hole is getting deeper :) I guess for that to work the devices I want to track ad need assigning a static IP address?
 

Attachments

  • Screenshot 2024-10-29 at 18.03.22.webp
    Screenshot 2024-10-29 at 18.03.22.webp
    59.6 KB · Views: 8
Yes. Static addresses make it all work. It should be easy enough to do that. In my router settings there’s a little hard drive symbol next to each connected device. I click on that then I can either use the current address or choose another. I wouldn’t set a static address on each device, better to do it on the router then there won't be any conflicts. It’s a little work, granted, but only needs to be done once and well worth it for the protection and feedback you’re getting in return. You also get that feeling of satisfaction when it all works!

Don’t use NextDNS profiles on each device - only those like your phone which you use outside your home network. The whole point of NextDNS CLI is that it does all the work and allocates the correct DNS address to your devices. If you use a device profile you will be bypassing the CLI and won’t be taking advantage of the caching.
 
Yep I'll have to think as to which devices I want to track. The CCTV system, the Home Kit Cameras, and the TV I think are the only ones I'd be bothered about.

The iPhones / iPads are using the profiles and the Mac Mini / iMac.

Mac Mini / iMac I may well switch over to static IP addresses and then track them via the static IP once I can work out exactly how to edit that host file. (Any tips on that??)

I'll have to look at the network, the devices on it and make a proper project plan for implementation I guess.
 
Install the SynoCommunity repository as outlined in the link I sent you. Then install the SynoCLI File Tools package. SSH to your NAS in a terminal and enter nano /etc/hosts. Use the arrow keys to navigate the file, not the mouse. Once you have entered what you need type control x and your changes will be saved. If you’ve never used the terminal to access your NAS you will have to learn how to access it using SSH. I recommend Marius Hosting - that guy has a huge amount of information on the Synology NAS and how to do almost anything on it. You will need his tutorial on how to access it using SSH:


Learning how to access your NAS from the command line is very useful. If you move to using Docker images (I use many) it’s easy to set them up and administer them from the terminal. It can also get you out of a pickle should you mess anything up and cannot access the GUI.
 
Thanks I'll see where that takes me to. Planning next I guess :)

I know Marius well we've been friends for a couple of years now :)
 
Before I press on with the work of editing the hosts file I'm workout through which devices I want to identify. I'm thinking the NAS, Orbi Router and satellites, the Macs, CCTV NVR, new smart TV.

The rest of the devices are HomePods, printers, Blu-ray player, and HomeKit lamps, so I don't think it's worth applying static IPs to all of those.

Some devices though like the Macs, the smart TV are connected both via network cable and WiFi. The Mac's need both for Watch unlock, etc. How are you handling / would you handle such devices with respect to the hosts file entries?
 
enter nano /etc/hosts.
Okay I had a chat with Marius about editing the 'hosts' file and (he knows I hate command line work) and he recommended I follow this tutorial and install File Browser. That way I could make the changes easily and also back up the file before I made any changes.
The only issue I seem to have is that I don't have an /etc/ directory. I have a lot of hosts files but none that seems to match that path.
Any ideas where I should look? Or do I go into the root and create the directory and file?



Screenshot 2024-10-31 at 11.42.44.webpScreenshot 2024-10-31 at 12.55.31.webp
 
Last edited:
I added them after the existing contents in this form:

192.168.86.1 Router
192.168.86.2 AmplifiHD
192.168.86.3 AmplifiHD_Bedroom
192.168.86.5 AmplifiHD_Study
192.168.86.6 Echo-White
192.168.86.7 Echo-Dot-White
Okay I've added the entries as per:

192.168.1.77 NVR
192.168.1.202 NAS
192.168.1.254 Orbi-1
192.168.1.220 Orbi-2
192.168.1.221 Orbi-3
192.168.1.240 LG_G4_TV
And rebooted the NAS but alas no new devices are showing up in NextDNS.

A little investigation later......

It seems when rebooting the NAS it overwrites the HOSTS file to be as it was....... ARGH!
 
Okay we move on.......

I posted about the problem on the Synology forum and they advised that I needed to be logged in as the root user to get the changes to stick.
I went into the Cloud Commander settings and clicked on authentication. I now get prompted for a user and a password. The issue is any accounts I try to log in with fail. I've tried:
  • 'root' using the 'Admin' account password (I believe it uses the same one).
  • 'admin' using the 'Admin' account password.
  • my 'usual admin account
And none of them work. Each time I try and access Cloud Commander I hit the log in prompts so I'm somewhat stuck.

Any further ideas guys? So very close to what I need to achieve.....
 
SSH to your NAS in a terminal and enter nano /etc/hosts. Use the arrow keys to navigate the file, not the mouse. Once you have entered what you need type control x and your changes will be saved.
@scgf I'm going to try this to see if I fare any better. Can I copy the data I want to add into the clipboard and paste it into the file once editing?
 
Thanks, I gave up on the project in the end as the NextDNS system didn't;y suit....
 

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.

Similar threads

Well Container Manager is the new front-end to Docker. I would expect it to be able to run DNSfilter in...
Replies
1
Views
758
Thanks for your response. So, will this work with my ddns addresses? The reason I ask is because while I...
Replies
2
Views
173
A simple enough task, but I’m missing something somewhere. I’m new to ipv6, so do please state the...
Replies
0
Views
161
  • Solved
Thank you all for your quick responses! I went with a network reset, and have access to my drive again...
Replies
5
Views
633
I will leave others to comment that have or had experience with Minix, personally I haven’t.
Replies
3
Views
465
  • Question Question
thank you power cycle worked. i had been reluctant to try that
Replies
3
Views
535
Good that it is working! No, it is not a security risk. It will automatically use the stored credentials...
Replies
12
Views
1,407

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top