How do I stop logging of DNS queries in /var/log/messages ?

CLI Version: 1.37.7
Platform: mipsle (Ubiquiti EdgeRouter X)

I'm using nextdns with dnsmasq on my Edgerouter X.

Here is my nextdns.conf:

auto-activate false
control /var/run/nextdns.sock
config xxxxxx
max-ttl 0s
report-client-info false
max-inflight-requests 256
mdns disabled
hardened-privacy false
setup-router false
cache-size 0
cache-max-age 0s
detect-captive-portals false
bogus-priv true
log-queries false
use-hosts false
timeout 5s

dnsmasq is set up more or less like this (some irrelevant parts removed):

    dns {
        forwarding {
            cache-size 1000
            listen-on switch0.10
            listen-on switch0.20
            options no-resolv
            options query-port=53054
            options server=
            options bogus-priv
            options domain-needed
            options stop-dns-rebind


Question: How can I stop /var/log/messages filling up with lines like this:

ubnt@ubnt:~$ tail /var/log/messages
Dec 30 22:51:42 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=9ms tls=34ms, TCP, TLS13)
Dec 30 22:52:13 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=9ms tls=34ms, TCP, TLS13)
Dec 30 22:54:14 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=12ms tls=62ms, TCP, TLS13)
Dec 30 22:55:35 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=9ms tls=34ms, TCP, TLS13)
Dec 30 22:57:13 ubnt nextdns[7797]: Connected (con=8ms tls=34ms, TCP, TLS13)
Dec 30 22:58:47 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=12ms tls=44ms, TCP, TLS13)
Dec 30 23:00:01 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=9ms tls=35ms, TCP, TLS13)
Dec 30 23:01:16 ubnt nextdns[7797]: Connected (con=9ms tls=58ms, TCP, TLS13)
Dec 30 23:03:44 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=9ms tls=34ms, TCP, TLS13)
Dec 30 23:06:12 ubnt nextdns[7797]: Connected [2a00:11c0:8:4::9]:443 (con=10ms tls=34ms, TCP, TLS13)


4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • The connection logs cannot be shut off unfortunately. You'll see them logged every few minutes when the CLI establishes a connection, so they're not per-query but still pretty darn common. There have been some other posts and bugs filed about being able to shut this off but as of now I don't think that feature's been implemented. Here's one of the bugs, idle since Feb. Supress Connected message in syslog · Issue #425 · nextdns/nextdns (github.com)

  • Looks like it'll take a few weeks before /var/log/messages gets too big and my router crashes.

    Software really shouldn't be filling /var/log/messages with high volume useless rubbish like this.


    Like 1
    • Brian Gregory yeah, better to hide this type of message behind a verbose or debug flag. That aside – Do the Edgerouters not rotate the messages files daily? The UDM does but that’s the only Ubiquiti product I’m familiar with.

      Like 1
    • Brian Gregory I agree - a way to stop nextDNS logging would be awesome.  FYI - messages rotate once 1 MB in size (checked every hour as I remember).  As this is in temp (memory) no flash writes.  Cut back on number of message logs if you have space issues.

      set system syslog global archive files 2
      Like 1
Like1 Follow
  • 1 yr agoLast active
  • 4Replies
  • 216Views
  • 3 Following