0

How to config Stubby to work on linux NextDNS configs?

This may be a little outside of NextDNS scope - but I can't seem to get stubby to work much less use your config file  on Linux (debian/LMDE).

 

I think everything is working, but I still get

"This device is not using NextDNS. This device is currently using ”OpenDNS” as DNS resolver." From my next dns profile page (I configured my to use my system default dns. And

$ dig
...
 SERVER: 208.67.222.222#53(208.67.222.222) (UDP)

 

WHAT I'VE DONE SO FAR:

From a CLEAN OS install:

sudo apt install stubby

I added the suggested config to /ect/stubby.yml  (I added your NextDNS upstream_recursive_servers ABOVE the test servers in the file - but left the test server text in the stubby.yml file)

Then I started and confirmed stubby was running.  I restarted Network Manager and confirmed stubby was listening. 

$ sudo systemctl start stubby
$ sudo systemctl enable stubby
$ sudo systemctl status stubby
...
     Loaded: loaded (/lib/systemd/system/stubby.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-11-01 10:55:02 PDT; 14min ago
...

$ sudo systemctl restart NetworkManager
$ sudo netstat -lntpu | grep stubby
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      936/stubby
tcp6       0      0 ::1:53                  :::*                    LISTEN      936/stubby
udp        0      0 127.0.0.1:53            0.0.0.0:*                           936/stubby
udp6       0      0 ::1:53                  :::*                                936/stubby

I confirmed that my configs were included in the current stubby running:

$ sudo stubby -i
...
    "upstream_recursive_servers":
    [
      {
        "address_data": <bindata for 45.##.##.##>,
        "address_type": <bindata of "IPv4">,
        "tls_auth_name": <bindata of "**MYID**.dns.nextdns.io">
      },
      {
        "address_data": <bindata for ####:####::>,
        "address_type": <bindata of "IPv6">,
        "tls_auth_name": <bindata of "**MYID**.dns.nextdns.io">
      },
      {
        "address_data": <bindata for 45.##.##.##>,
        "address_type": <bindata of "IPv4">,
        "tls_auth_name": <bindata of "**MYID**.dns.nextdns.io">
      },
      {
        "address_data": <bindata for ####:####::>,
        "address_type": <bindata of "IPv6">,
        "tls_auth_name": <bindata of "**MYID**.dns.nextdns.io">
      },
      # THERE ARE SOME DEFAULT TEST SERVERS BELOW THIS THAT ID DID NOT DELETE
...
Result: Config file syntax is valid.

1 reply

null
    • RagingBullDurham
    • 5 mths ago
    • Reported - view

    I THINK RESOLVED:

    Resolved:

    You need to permanently change the system DNS server to 127.0.0.1 to point to stubby (listening on 127.0.0.1)

    I used this article here for the steps

    But for shorthand:

    You can always change the system DNS server TEMPORARILY by editing /etc/resolv.conf (to test it out)

    $ sudo nano /etc/resolv.conf  #add the line 'nameserver 127.0.0.1' at the top to point to stubby

    I did a lot of steps - but I <<think>> restarting stubby takes care of incorporating the new name server,

    sudo systemctl restart stubby

    Great for testing (try dig or even your NextDNS profile page to ensure it's working). Remember NetworkManager (or some other service ) overwrites the file with the old name servers on reboot.

    TO PERMANENTLY CHANGE THE DNS SERVER:

    Install and use resolvconf, and place your name servers in the template file '/etc/resolvconf/resolv.conf.d/head' and the changes should be permanent.

    $ sudo apt install resolvconf
    $ sudo nano /etc/resolvconf/resolv.conf.d/head # #add the line 'nameserver 127.0.0.1' at the top to point to stubby
    $ sudo systemctl start resolvconf.service
    $ sudo systemctl enable resolvconf.service

    All should be good to go (permanently!)

Content aside

  • 5 mths agoLast active
  • 1Replies
  • 269Views
  • 1 Following