Synology router (SRM) cannot find nextdns.sh
Installation and configuration is succesfull, but afterwards I get the error:
SynologyRouter> nextdns status
Error: /usr/local/etc/rc.d/nextdns.sh status: exit status 1:
Also, I noticed that nextdns.sh is not located in usr/local/etc/rc.d Thus, commands like start and stop do not work.
SynologyRouter> DEBUG=1 sh -c "$(curl -sL https://nextdns.io/install)" INFO: OS: synology INFO: GOARCH: armv7 INFO: GOOS: linux DEBUG: Start install loop with CURRENT_RELEASE= DEBUG: NextDNS is not installed i) Install NextDNS e) Exit Choice (default=i): e SynologyRouter> DEBUG=1 sh -c "$(curl -sL https://nextdns.io/install)" INFO: OS: synology INFO: GOARCH: armv7 INFO: GOOS: linux DEBUG: Start install loop with CURRENT_RELEASE= DEBUG: NextDNS is not installed i) Install NextDNS e) Exit Choice (default=i): i INFO: Installing NextDNS... DEBUG: Using bin install type DEBUG: Installing 1.5.4 binary for linux/armv7 to /usr/local/bin/nextdns DEBUG: Downloading https://github.com/nextdns/nextdns/releases/download/v1.5.4/nextdns_1.5.4_linux_armv7.tar.gz DEBUG: Start configure DEBUG: Get configuration ID DEBUG: Previous config ID: xxxx NextDNS Configuration ID (default=xxxx): DEBUG: Add arg -config=xxxx Sending your devices name lets you filter analytics and logs by device. Report device name? [Y|n]: y DEBUG: Add arg -report-client-info=true Only use DNS servers located in jurisdictions with strong privacy laws. This may increase latency. Enable hardened privacy mode (may increase latency)? [Y|n]: y DEBUG: Add arg -hardened-privacy=true DEBUG: Add arg -setup-router=true Changes DNS settings of the host automatically when nextdns is started. If you say no here, you will have to manually configure DNS to 127.0.0.1. Automatically configure host DNS on daemon startup? [Y|n]: n DEBUG: Add arg -auto-activate=false NextDNS installed and started using synology init Error: /usr/local/etc/rc.d/nextdns.sh start: exit status 1: ERROR: install: exit 0 DEBUG: Start install loop with CURRENT_RELEASE=1.5.4 DEBUG: NextDNS is up to date (1.5.4) c) Configure NextDNS r) Remove NextDNS e) Exit Choice (default=c):
What do you get for ls -ld /usr/local/etc/rc.d/?
What do you get for
ls -ld /usr/local/etc/rc.d/?
SynologyRouter> ls -ld /usr/local/etc/rc.d/ drwxr-xr-x 2 root root 4096 Apr 29 22:37 /usr/local/etc/rc.d/
Got the same issue:
NextDNS installed and started using synology init
Error: /usr/local/etc/rc.d/nextdns.sh start: exit status 1:
ERROR: install: exit 0
After trying run script got more informative message:
> /usr/local/etc/rc.d/nextdns.sh start
Starting nextdns
Unable to start
Error: proxy: tcp: listen tcp 127.0.0.1:5342: bind: address already in use
Same here.
I have a Synology router and a Synology NAS, so I tested on both.
Works fine on the NAS, but same issue with router.
The problem with the NAS is that you cannot get the per-device logs and analytics online. It shows all queries coming from the router (DNS set with NextDNS on the NAS). This is why I'd like to install on the router itself.
Thank you!
Same here.
I have a Synology router and a Synology NAS, so I tested on both.
Works fine on the NAS, but same issue with router.
The problem with the NAS is that you cannot get the per-device logs and analytics online. It shows all queries coming from the router (DNS set with NextDNS on the NAS). This is why I'd like to install on the router itself.
Thank you!
Hey, try the following:
- use the NAS as your dns server on each device, instead of the router
- put the devices on /etc/hosts file on NAS
then the devices will appear on analytics.
Yes, that should work, indeed. I'll try and let you know.
But the whole point was to avoid having to set up the DNS server on each device, hence the one-time router setting ;-) I'm currently switching back and forth between 1.1.1.1 and unlocator DNS (185.37.37.37), depending on my needs, directly on the router, that is so convenient!
What do you get for sudo /usr/local/etc/rc.d/nextdns.sh restart
What do you get for
sudo /usr/local/etc/rc.d/nextdns.sh restart
SynologyRouter> sudo /usr/local/etc/rc.d/nextdns.sh restart -ash: sudo: not found
I can only ssh as root on the router (ssh [email protected]), even if admin user is deactivated. Not the same behaviour as the NAS (ssh with user account, then sudo -i)
Please remove sudo
> SynologyRouter> /usr/local/etc/rc.d/nextdns.sh restart
Not running
Starting nextdns
Unable to start
SynologyRouter> Error: proxy: udp: listen udp 127.0.0.1:5342: bind: address already in use
SynologyRouter>
And ps w | grep nextdns
SynologyRouter> ps w | grep nextdns
6116 root 783m S /usr/local/bin/nextdns run
12462 root 3892 S grep nextdns
SynologyRouter>
I'm wondering whereas it could come from the SafeAccess app, which is basically a parental control layer. Usually these kind of application use a self DNS server, don't they?
I'd have to try to deactivate it, if that's something you think might help to resolve the issue...
Here the problem seem to be the init script not finding the previous process running on restart. The pid is either missing or not containing the right pid.
PID is correct.
ps | grep nextdns 15014 root 782m S /usr/local/bin/nextdns run 15519 root 3892 S grep nextdns
cat /var/run/nextdns.pid 15014
Failed to start process after install.
Looks like real issue is dnsmasq running on port 53. Synology SRM use dnsmasq for DoH and even if you disable DoH dnsmasq still binding to port 53. NextDNS installer changes dhcp-vendor.conf, but that change doesn't work for SRM.
I don’t have a SRM. Any idea what would work?
Don't know good way to disable just DNS. Disabling dnsmasq will turn off DHCP server as well. Also dhcpd.conf is managed by SRM, so changes will be overwritten.
Just as idea. Is it possible to tell NextDNS to don't bring up it's own DNS server? I can configure Synology SRM to use NextDNS as upstream server via DNS over HTTP. In that case discovery part of NextDNS client should work and user will need one manual step to configure DNS.
Set the dnsmasq port to 0, it will disable dns and keep dhcp.