1

NextDNS on postmarketOS (Alpine Linux based)

Hi. I'm trying to use NextDNS on postmarketOS on a Librem 5 phone. PostmarketOS does not use systemd for now, so I tried to install using the next method on the list: the CLI installer with the automated install script. Unfortunately it did not detect postmarketOS although it did detect that it's like Alpine, but didn't give me any options to continue.

 

ERROR: Unsupported OS: Linux VERSION_ID=v24.06 ID=postmarketos ID_LIKE=alpine
ERROR: Unknown bin location for
INFO: OS:
INFO: GOARCH: arm64
INFO: GOOS: linux
INFO: NEXTDNS_BIN:
INFO: INSTALL_RELEASE: 1.43.5
ERROR: Cannot detect running environment.

 

 

So I tried to install it using the manual method for Alpine. The install went fine, and for configuration, I use the workstation method since the Librem 5 basically runs a desktop Linux OS:

sudo nextdns install -profile device--identifier-myprofileid -report-client-info -auto-activate

 

 

However, it does not seem to be using NextDNS to resolve? Am I doing something wrong? Perhaps the device identifier should not be in the profile ID?

If I enter only the profile ID with nothing prepended, how do I identify this device?

Would appreciate any help.

Thanks.

17 replies

null
    • R_P_M
    • 1 mth ago
    • Reported - view

    The device is identified by the CLI itself, just use the profile ID.

      • whosnext
      • 1 mth ago
      • Reported - view

      Thanks I'll try that.

      I think it's normal for the NextDNS dashboard to start showing logs several hours after first activating, right?

      However, dnsleaktest should let me know straight away if it's working and using the NextDNS servers or no, correct?

      • R_P_M
      • 1 mth ago
      • Reported - view

       That would be no and yes. The logs should show within minutes (analytics takes a little longer but nowhere near hours later, at worst 30 mins). The leak test should show it as soon as you have changed to NextDNS.

       You can also use “curl -L https://test.nextdns.io” on the command line to check it’s working correctly. 

      • whosnext
      • 2 days ago
      • Reported - view

      Thanks for your reply. I tried that but it says: "unconfigured"

      It's still using the DNS server specified in my router, not NextDNS : (

      • R_P_M
      • yesterday
      • Reported - view

       Run “dig google.com” to see what the system is using for DNS (local IP). Also check NextDNS is running with “ps auxc | grep -A2 -i nextdns”. See if there’s any logs with “nextdns log”.

      I’ll see if I can get that wiki error fixed sometime soon. 

      • whosnext
      • yesterday
      • Reported - view

       

       

      ~ $ ps auxc | grep -A2 -i nextdns
       5243 r         0:00 grep -A2 -i nextdns
      ~ $

      Running nextdns log gives "Error: not supported"

      ~ $ dig google.com
      ; <<>> DiG 9.18.27 <<>> google.com
      ;; global options: +cmd
      ;; Got answer:
      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64184
      ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
      ;; OPT PSEUDOSECTION:
      ; EDNS: version: 0, flags:; udp: 1232
      ;; QUESTION SECTION:
      ;google.com.            IN    A
      ;; ANSWER SECTION:
      google.com.        193    IN    A    142.250.76.110
      ;; Query time: 16 msec
      ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
      ;; WHEN: [redacted]
      ;; MSG SIZE  rcvd: 55
      ~ $
      • R_P_M
      • yesterday
      • Reported - view

       According to the “ps” result NextDNS CLI is not running. Without a log it may be difficult to find out why NextDNS is not running.

      Any change after “nextdns start” command?

      • whosnext
      • yesterday
      • Reported - view

      I don't think so:

      ~ $ nextdns start
      Error: rc-service nextdns start: exit status 1:  * nextdns: superuser access required
      ~ $ sudo nextdns start
      [sudo] password for r:
      ~ $ nextdns log
      Error: not supported
      ~ $ cat /etc/resolv.conf
      # Generated by NetworkManager
      nameserver 127.0.0.1
      options edns0 trust-ad
      ~ $ ps auxc | grep -A2 -i nextdns
      15551 r         0:00 grep -A2 -i nextdns
      ~ $ ps auxc | grep -A2 -i nextdns
      15576 r         0:00 grep -A2 -i nextdns
      ~ $
      
      • R_P_M
      • 12 hrs ago
      • Reported - view

      Yep, it's not starting.

      Next thing to try is using a different internal IP. Edit the file "/etc/nextdns.conf" (using superuser privileges), locate the line "listen localhost:53" and change to "listen 127.0.0.2:53" (or whatever number before :53).

      sudo nextdns start
      
      ps auxc | grep -i nextdns
      
      • whosnext
      • 8 hrs ago
      • Reported - view

      Thanks for continuing to help. Changed to 127.0.0.2:53 but still giving the same output, so not running.

    • whosnext
    • 2 days ago
    • Reported - view

    Note: Manual instructions for installing NextDNS given here https://github.com/nextdns/nextdns/wiki/Alpine-Linux-Based-Distribution will overwrite /etc/apk/repositories. Use -a option to append, instead of overwriting.

    sudo tee -a /etc/apk/repositories >/dev/null
    
    

    Related issue: https://github.com/nextdns/nextdns/issues/965

      • whosnext
      • yesterday
      • Reported - view

      @r_p_m Also, I think the Alpine instructions should have doas, not sudo, as there is no sudo by default.

      • R_P_M
      • yesterday
      • Reported - view

      Interesting, will look into it. 

      • whosnext
      • 8 hrs ago
      • Reported - view

      In case this info is useful, I tried the Alpine instructions (with doas and -a) in a VM and it worked perfectly. That was a few days ago. It did stop resolving for a few minutes today, but it's now completely working again.

      • whosnext
      • 2 hrs ago
      • Reported - view

      Ok, it's not working again:

      ~ $ nextdns log
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on TCP/[::1]:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on TCP/127.0.0.1:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on UDP/127.0.0.1:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on TCP/127.0.0.1:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on UDP/127.0.0.1:53
      Nov 15 17:16:51 localhost daemon.notice nextdns[5084]: Listening on UDP/[::1]:53
      Nov 15 17:33:19 localhost daemon.notice nextdns[5084]: Received signal: terminated
      Nov 15 17:33:19 localhost daemon.notice nextdns[5084]: Stopping NextDNS 1.43.5/linux
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on TCP/[::1]:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on UDP/127.0.0.1:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on UDP/127.0.0.1:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on TCP/127.0.0.1:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on TCP/127.0.0.1:53
      Nov 19 14:43:50 localhost daemon.notice nextdns[4161]: Listening on UDP/[::1]:53
      Nov 19 14:48:02 localhost daemon.notice nextdns[4161]: Received signal: terminated
      Nov 19 14:48:02 localhost daemon.notice nextdns[4161]: Stopping NextDNS 1.43.5/linux
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on TCP/[::1]:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on UDP/127.0.0.1:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on TCP/127.0.0.1:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on UDP/127.0.0.1:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on TCP/127.0.0.1:53
      Nov 19 14:50:30 localhost daemon.notice nextdns[2531]: Listening on UDP/[::1]:53
      Nov 19 14:50:35 localhost daemon.notice nextdns[2531]: Activating
      Nov 19 14:50:35 localhost daemon.err nextdns[2531]: Activate: NetworkManager resolver management: exec: "systemctl": executable file not found in $PATH
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on TCP/[::1]:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on TCP/127.0.0.1:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on TCP/127.0.0.1:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on UDP/127.0.0.1:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on UDP/[::1]:53
      Nov 20 09:51:14 localhost daemon.notice nextdns[2531]: Listening on UDP/127.0.0.1:53
      Nov 20 09:51:19 localhost daemon.notice nextdns[2531]: Activating
      Nov 20 09:51:19 localhost daemon.err nextdns[2531]: Activate: NetworkManager resolver management: exec: "systemctl": executable file not found in $PATH
      Nov 20 09:51:35 localhost daemon.notice nextdns[2531]: Connected 185.99.133.208:443 (con=6ms tls=13ms, TCP, TLS13)
      Nov 20 09:51:35 localhost daemon.notice nextdns[2531]: Switching endpoint: https://dns.nextdns.io#185.99.133.208,103.1.213.21,2a06:1280:bee1:2::ee12:133,2401:3bc0:b:2::2
      Nov 20 09:51:36 localhost daemon.notice nextdns[2531]: Connected 45.90.28.0:443 (con=26ms tls=46ms, TCP, TLS13)
      Nov 20 09:56:31 localhost daemon.notice nextdns[2531]: Connected 185.99.133.208:443 (con=5ms tls=5ms, TCP, TLS13)
      Nov 20 10:00:23 localhost daemon.notice nextdns[2531]: Connected 185.99.133.208:443 (con=6ms tls=6ms, TCP, TLS13)
      Nov 20 10:04:23 localhost daemon.notice nextdns[2531]: Connected 185.99.133.208:443 (con=10ms tls=7ms, TCP, TLS13)
      Nov 20 10:12:31 localhost daemon.notice nextdns[2531]: Connected 185.99.133.208:443 (con=6ms tls=7ms, TCP, TLS13)
      Nov 21 00:11:26 localhost daemon.notice nextdns[2531]: Received signal: terminated
      Nov 21 00:11:26 localhost daemon.notice nextdns[2531]: Stopping NextDNS 1.43.5/linux
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on TCP/[::1]:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on UDP/127.0.0.1:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on UDP/127.0.0.1:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on TCP/127.0.0.1:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on UDP/[::1]:53
      Nov 21 10:26:26 localhost daemon.notice nextdns[2533]: Listening on TCP/127.0.0.1:53
      Nov 21 10:26:31 localhost daemon.notice nextdns[2533]: Activating
      Nov 21 10:26:50 localhost daemon.err nextdns[2533]: Activate: NetworkManager resolver management: exec: "systemctl": executable file not found in $PATH
      Nov 21 11:36:21 localhost daemon.notice nextdns[2533]: Received signal: terminated
      Nov 21 11:36:21 localhost daemon.notice nextdns[2533]: Stopping NextDNS 1.43.5/linux
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on TCP/[::1]:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on UDP/127.0.0.1:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on TCP/127.0.0.1:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on UDP/127.0.0.1:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on UDP/[::1]:53
      Nov 21 16:40:16 localhost daemon.notice nextdns[2535]: Listening on TCP/127.0.0.1:53
      Nov 21 16:40:21 localhost daemon.notice nextdns[2535]: Activating
      Nov 21 16:40:21 localhost daemon.err nextdns[2535]: Activate: NetworkManager resolver management: exec: "systemctl": executable file not found in $PATH
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Starting NextDNS 1.43.5/linux on localhost:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on TCP/[::1]:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on UDP/127.0.0.1:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on UDP/127.0.0.1:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on TCP/127.0.0.1:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on TCP/127.0.0.1:53
      Nov 21 16:50:10 localhost daemon.notice nextdns[2556]: Listening on UDP/[::1]:53
      Nov 21 16:50:15 localhost daemon.notice nextdns[2556]: Activating
      Nov 21 16:50:15 localhost daemon.err nextdns[2556]: Activate: NetworkManager resolver management: exec: "systemctl": executable file not found in $PATH
      
      • whosnext
      • 2 hrs ago
      • Reported - view

       

      ~ $ doas nextdns start
      
      ~ $ ps auxc | grep -i nextdns
       2556 root      0:00 /usr/bin/nextdns run
       6523 r         0:00 grep -i nextdns
      ~ $ 
      • whosnext
      • 2 hrs ago
      • Reported - view

      And now it's working again. Log file hasn't changed at all. No idea what's going on. Time between VM reboot and checking/reporting this was over 10 minutes.

Content aside

  • 1 Likes
  • 2 hrs agoLast active
  • 17Replies
  • 54Views
  • 2 Following