Skip to content
Olivier Poitrey edited this page Aug 11, 2023 · 8 revisions

NextDNS CLI has no native support on DD-WRT GUI yet, so it must be installed on JFFS.


Installation

  1. Enable JFFS if its not done already
    1. On the router web page click on Administration.
    2. Scroll down until you see JFFS2 Support section.
    3. Click Enable Flash Storage.
    4. Click Save.
    5. Wait couple seconds, then click Apply.
    6. Wait again. Go back to the Enable JFFS section, and enable Wipe Flash Storage.
    7. Do not click Save. Click Apply instead.
    8. Wait till you get the web-GUI back, then disable Wipe Flash Storage again.
    9. Click Save.
  2. Connect to SSH
  3. Execute:
sh -c "$(curl -sL https://nextdns.io/install)"

Upgrade

To upgrade to the latest version, simply re-run the installer. If a new version is available, the upgrade action will be added to the list of possible actions.

Useful commands

cat /jffs/etc/nextdns.conf

lists nextdns configuration file

/jffs/nextdns/nextdns config list -h

lists usage of nextdns config list

Tips&Tricks

You can run NextDNS CLI in a conjuction with dnsmasq and no extra steps are needed, but if you run it as a standalone dns client with enabled cache (this mode disables dnsmasq dns capabilities with directive port=0) you need to ssh to your DD-WRT and run:

/jffs/nextdns/nextdns config set -forwarder 2.pool.ntp.org=45.90.30.120,45.90.28.120
/jffs/nextdns/nextdns restart

this way DD-WRT’s ntpclient will work before DoH connection is established and will provide valid time for cert creation, again needed for DoH. Otherwise you will get known x509: certificate has expired or is not yet valid error.

For proper work NextDNS CLI edits dnsmasq.conf file with message Configuration generated by NextDNS so yours dnsmasq Additional Options will be erased every time router reboots. This is bad if you use dnsmasq for DHCP for example and have static entries. To mitigate such behaviour you can create your own dnsmasq.conf file and copy it to the /jffs/etc/dnsmasq.conf location which will be automatically executed by DD-WRT on bootup. DO NOT forget to add lines NextDNS CLI added during conf generation (such as port=0 or similar).

Troubleshooting

If the installation fails, please run the installer in debug mode and open an issue the transcript of the installation:

DEBUG=1 sh -c "$(curl -sL https://nextdns.io/install)"