0

Unable to set CLI configs in UniFi OS / UCG-Fiber

Hi there!

Just got my UCG-Fiber and was able to install the NextDNS CLI without an issues. I was able to see analytics and ads were being blocked, YAY!

The only thing I am having an issue is setting certain configs via CLI. Below is the current config on the UCG-Fiber:

root@Cloud-Gateway-Fiber:~# nextdns config
discovery-dns
detect-captive-portals false
max-inflight-requests 256
listen localhost:53
cache-size 1000
report-client-info true
bogus-priv true
setup-router true
log-queries false
cache-max-age 0s
hardened-privacy false
profile (Redacted)
use-hosts true
timeout 5s
auto-activate false
debug false
control /var/run/nextdns.sock
max-ttl 5s
mdns all
root@Cloud-Gateway-Fiber:~#

What I would like to change is:

-cache-max-age 3600s (1 hour)

-log-queries true

-auto-activate true

-max-ttl 30s

 

I've tried:

nextdns config set \
  -cache-size 2MB \
  -cache-max-age 3600s \
  -log-queries \
  -auto-activate true \
  -max-ttl 30s

-and-

nextdns config set cache-max-age 3600s
nextdns config set log-queries true
nextdns config set auto-activate true
nextdns config set cache-size 2MB

But I keept getting an error message 'Error: usage:'. I've tried looking all over the net but I might not be looking in the right places.

Thank you for the help!

 

Best regards!

3 replies

null
    • Ryszard.1
    • 5 days ago
    • Reported - view

    Actually this has been resolved, for some reason the set commands are now working.. weird!!!

    root@Apartment-Cloud-Network:~# nextdns config
    hardened-privacy false
    timeout 5s
    max-inflight-requests 256
    debug false
    mdns all
    setup-router true
    log-queries true
    cache-size 2MB
    cache-max-age 1h0m0s
    report-client-info true
    discovery-dns
    bogus-priv true
    use-hosts true
    listen localhost:53
    profile xxxxxx
    max-ttl 5m0s
    detect-captive-portals false
    auto-activate true
    control /var/run/nextdns.sock
    root@Apartment-Cloud-Network:~#

      • R_P_M
      • 5 days ago
      • Reported - view

      You didn't quite get the set command correct, it's missing the "=" character.

      Example:

      nextdns config set -auto-activate=true
      

      When you want to set a value to an option you need to write the command in this way, no wonder it complained.

      Anyway, this is just for your reference since you've got things working.

      • Ryszard.1
      • 5 days ago
      • Reported - view

      Thank you for replying :)

      Interestingly enough, to enable a config I didn't need to add the =true. Now to disabled, I bet we would def need the =false. 

      Haven't tried it yet because everything is working oh so great right now. 😉

      This is how I enabled/tweaked the following configs:

      root@Cloud-Gateway-Fiber:~# nextdns config set -auto-activate
      root@Cloud-Gateway-Fiber:~# nextdns config set -log-queries
      root@Cloud-Gateway-Fiber:~# nextdns config set -max-ttl 30s
      root@Cloud-Gateway-Fiber:~# nextdns config set -cache-size 2MB
      root@Cloud-Gateway-Fiber:~# nextdns config set -cache-max-age 3600s

       

      Nonetheless, thank you for the reference! :)

Content aside

  • 5 days agoLast active
  • 3Replies
  • 50Views
  • 2 Following