0

Cant get NextDNS setup on UDM Pro 1.9.2.3432

Hello, 

I've been trying to setup NextDNS CLI on UDM Pro but with no success. I went through every installation step listed under the setup guide and got it installed. However, when I try "Nextdns activate", I get "Error: setup resolv.conf: rename /etc/resolv.conf /etc/resolv.conf.nextdns-bak: device or resource busy

Error: non zero exit code: 1: OCI runtime error "

I already disable auto-activate but still no luck. Restarted/Rebooted the whole Unifi stack a gazillion times without success. 

I would appreciate any and all guidance. 

41replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • You can ignore the error, activation does not work on UDM. The only consequence is that DNS queries performed by the router itself are not going thru NextDNS, but all your LAN's queries will.

    Like
    • Olivier Poitrey I also have this issue, however the queries aren't coming to NDNS. I have three networks set up, each defined in nextdns settings on the UDM, I have verified the network ID in the dashboard is correct in the nextdns config, but no queries are hitting NextDNS.

      Like
    • Christopher Andrews 

      This is the config I am using. The three networks are set up in the NDNS dashboard. I have verified the network IDs.  None of the traffic on any of those three networks show in the Logs.

      # sudo nextdns config
      listen localhost:53
      config 11.11.30.0/24=******
      config 11.11.20.0/24=******
      config 11.11.10.0/24=******
      config b31d7b
      log-queries false
      use-hosts true
      setup-router false
      control /var/run/nextdns.sock
      cache-size 10MB
      cache-max-age 0s
      max-ttl 5s
      bogus-priv true
      detect-captive-portals false
      auto-activate false
      report-client-info true
      discovery-dns
      hardened-privacy false
      timeout 5s
      # sudo nextdns restart
      Error: systemctl restart nextdns.service: exit status 1: Job for nextdns.service failed because the control process exited with error code.
      See "systemctl status nextdns.service" and "journalctl -xe" for details.

      Error: non zero exit code: 1: OCI runtime error

      Like
    • Olivier Poitrey howdy sir. Are you actually with NextDNS? If so, can you let me know the best method a paid user can obtain support for services not working?

      Like
    • Christopher Andrews why did you disable "setup-router"?

      Like
    • Olivier Poitrey I found a posting on the forum that said to try that if the install was failing. I tried with and without that. ANother posting suggested uninstall and reinstall. After uninstall, it now wont reinstall. I emailed the logs to the team@ email address for the failed install.

      Like
    • Christopher Andrews CLI on UDP Pro can't work without setup-router true. What happen if you turn it on?

      Like
    • Olivier Poitrey Nothing now. I uninstalled and reinstalled, and now it wont even install:

      # sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'
      INFO: OS: ubios
      INFO: GOARCH: arm64
      INFO: GOOS: linux
      INFO: NEXTDNS_BIN: /data/nextdns
      INFO: LATEST_RELEASE: 1.11.0
      i) Install NextDNS
      e) Exit
      Choice (default=i): i
      INFO: Installing NextDNS...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      gnupg1 is already the newest version (1.4.21-4+deb9u1).
      0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
      Ign:1 https://dl.bintray.com/nextdns/deb stable InRelease
      Get:2 https://dl.bintray.com/nextdns/deb stable Release [9511 B]
      Hit:2 https://dl.bintray.com/nextdns/deb stable Release
      Reading package lists...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      nextdns is already the newest version (1.11.0).
      0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
      ERROR: Installation failed: binary not installed in /data/nextdns
      ERROR: install: exit 0
      i) Install NextDNS
      e) Exit
      Choice (default=i):
       

      Like
    • Christopher Andrews try "nextdns config set -setup-router=true" then "nextdns restart"

      Like
    • Olivier Poitrey Cant, NextDns isn't installed now. See above, the log from the install. Failing because "binary not installed in /data/nextdns". This was after I uninstalled it hoping a reinstall would resolve the issue.

      Like
    • Christopher Andrews try entering the unifi container first using "unifi-os shell".

      Like
    • Olivier Poitrey That got me where I could run the script, I did a uninstall and reinstall. Definitely went further, except during install, this was noted (below). Not sure if it should be of concern?

      NextDNS installed and started using ubios init
      Error: systemctl start nextdns.service: exit status 1: Job for nextdns.service failed because the control process exited with error code.
      See "systemctl status nextdns.service" and "journalctl -xe" for details.

      ongratulations! NextDNS is now installed.
       

      Like
    • Christopher Andrews don't try the install script from inside the container, it won't work well. Your setup seems a bit screwed up right now. You may try to manually uninstall the package using "apt-get remove nextdns" from inside the container, then re-run the install from the outside. Once installed, edit the config instead of running the install script again and again. UDM Pro is a very complex setup, it's easy to get it into an odd state.

      Like
    • Olivier Poitrey Ok. I went back to the shell. Manually ran apt-get to uninstall. Went well. Left the shell, re-ran the setup. Looked like it installed. Now, I may be back to the ORIGINAL issue that the DNS queries aren't showing in the logs.  This is my config now since clean install. I have verified the endpoint IDs on each network on the NDNS dashboard. They are starred below, but I verified they match exactly on the dashboard. The DHCP service assigns the UDM IP as the DNS server, so I am confident DNS queries are hitting the UDM.

      # nextdns config
      cache-max-age 0s
      max-ttl 5s
      control /var/run/nextdns.sock
      config 11.11.30.0/24=******
      config 11.11.20.0/24=******
      config 11.11.10.0/24=******
      config ******
      log-queries false
      report-client-info true
      detect-captive-portals false
      listen localhost:53
      setup-router true
      bogus-priv true
      use-hosts true
      hardened-privacy false
      timeout 5s
      auto-activate true
      cache-size 10MB
      discovery-dns
       

      Like
    •  Olivier Poitrey  not sure if it matters, but nextdns log is showing this error:

      Apr 09 18:42:06 ubnt systemd[1]: Started NextDNS DNS53 to DoH proxy..
      Apr 09 18:42:11 ubnt nextdns[24273]: Setting up router
      Apr 09 18:42:12 ubnt nextdns[24273]: Activating
      Apr 09 18:42:12 ubnt nextdns[24273]: Activate: setup resolv.conf: rename /etc/resolv.conf /etc/resolv.conf.nextdns-bak: device or resource busy
       

      Like
    • Christopher Andrews activation error does not matter. Do you see something in any of those config ID logs?

      Like
    • Olivier Poitrey Nothing in the logs for those three config IDs, except on the main ID, general DNS requests from the router (source is showing my router's wan IP from when it was set to use Linked IP).  

      Like
    • Olivier Poitrey examples attached.

      Like
    • Christopher Andrews do you have IPv6 on your network?

      Like
    • Olivier Poitrey no sir.

      Like
    • Olivier Poitrey I changed my UDM WAN DNS to 9.9.9.9, and that moved all DNS traffic away from NDNS, which tells me the NextDns client on the UDM isn't running, or sending the requests properly.

      Like
    • Christopher Andrews oh so you changed the dns of the router manually before installing the cli? Can please reset it to it’s default value please.

      On UDM Pro we capture DNS queries destined to the router using iptables and reroute them to the cli. If you change the destination DNS IP, those rules won’t match.

      Like
    • Olivier Poitrey The DNS provided via DHCP to clients is set to the IP of the UDM. I only changed the WAN DNS for testing the linked IP.

      Like
    • Christopher Andrews what is the DNS IP set on the LAN clients?

      Like
    • Olivier Poitrey It's set to Auto on all three networks, which is giving the UDM IP of 11.11.10.1.

      Like
    • Christopher Andrews that is the problem, the CLI will only work private IPs are used.

      Like
    • Olivier Poitrey Those are my private internal NAT IPs... ON my edgerouter I used the same 11.11.10.1/24 for my lan and they worked on that.

      Like
    • Christopher Andrews those are public IPs, and CLI does not support that. Why don't you use private IP blocks? 

      Like
    • Olivier Poitrey I have two VPN connections that utilize 192.168. so I went with 11.11.x.x to not interfere. NOt sure if its a difference in the OS, but my EdgeRouter running NextDNS worked ok with my LAN on 11.11.x.x networks.

      Like
    • Olivier Poitrey  i'll change to 10.10.x.x and see if that resolves.

      Like
      • Aspi
      • Aspi
      • 6 mths ago
      • Reported - view

      Christopher Andrews let me know if this works out for you. I can then follow in your footsteps as I also have VLANs set up in my network.

      Like
    • Aspi Olivier Poitrey I changed to 10.10.x.x and it seems to have begun working. Thats odd that the Edgerouter allowed 11.11.x.x but the UDM doesnt, perhaps its the difference in EdgeOS and UnifiOS? Either way, looks like devices are populating now.   Aspi are you running a non-standard IP range for your LANs?

      Like
    • Olivier Poitrey  would you mind telling me how to delete a line from config, specifically "config 11.11.30.0/..."  I know how to add them but not remove them! Thank you for all your help.

      Like
    • Christopher Andrews edit the config file in /data/nextdns.conf

      Like
    • Olivier Poitrey Thanks again for your help!

      Like
  • I have the following entry in my config:

    listen localhost:53

    Like
  • Olivier Poitrey so I see that NextDNS is running but I still dont see any traffic hitting the service. I've had my WAN DNS changed to cloudfare prior to doing this, could that be the issue? I cant remember what they were before I had them changed to the Cloudfare. Also, I did change the DNS of the one of the LAN networks to the auto but that didn't help either. 

    Like
    • Aspi Are you also using a UDM? I had no issues with the NextDNS client running on my edgerouter, but now that its on the UDM none of the traffic is hitting. What version of Network and Controller are you on? Perhaps there's a common thread there.

      Like
      • Aspi
      • Aspi
      • 6 mths ago
      • Reported - view

      Christopher Andrews No, I am using UDM Pro running on 1.9.2.3432

      Like
    • Aspi Im also using a UDM Pro but on 1.9.3

      Like
  • Christopher Andrews No, for all of my LANs, I have standard 192.168.x.x. I am still new to the whole UDM Pro settings, can you please tell me what you did you do to get it NDNS working?

    Like
Like Follow
  • 6 mths agoLast active
  • 41Replies
  • 471Views
  • 4 Following