Skip to content

Instantly share code, notes, and snippets.

@mauvehed
Last active October 11, 2023 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauvehed/506173c4bd1c0e39d9883d4f1f0765a5 to your computer and use it in GitHub Desktop.
Save mauvehed/506173c4bd1c0e39d9883d4f1f0765a5 to your computer and use it in GitHub Desktop.
Using NextDNS on UDM Pro

NextDNS on UnifiOS

Source https://github.com/nextdns/nextdns/wiki/UnifiOS

To upgrade/uninstall, run this command again and select the approriate option

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

You can use the nextdns command to control the daemon.

Here is a few important commands to know:

Start, stop, restart the daemon:

nextdns start
nextdns stop
nextdns restart

Configure the local host to point to NextDNS or not:

nextdns activate
nextdns deactivate

Explore daemon logs:

nextdns log

For more commands, use:

nextdns help

Generate DEBUG logs

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

Advanced

Conditional profiling (by subnet/VLAN)

Source: https://github.com/nextdns/nextdns/wiki/Conditional-Profile

nextdns config set \
    -profile 10.0.4.0/24=12345 \
    -profile 00:1c:42:2e:60:4a=67890 \
    -profile abcdef
nextdns config set -max-ttl=5s
nextdns restart
nextdns config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment