I have recently started using unbound dns. i have configured all the things i need properly. But the server doesnt log when i make a query. Also i have no errors in the unbound.conf file

The following is my .conf file

# The server clause sets the main parameters.
server:
# whitespace is not necessary, but looks cleaner.

# verbosity number, 0 is least verbose. 1 is default.
verbosity: 1

# print statistics to the log (for every thread) every N seconds.
# Set to "" or 0 to disable. Default is disabled.
statistics-interval: 5


interface: 192.168.116.134

# port to answer queries from
port: 53


cache-min-ttl: 400
cache-max-ttl: 86400


# Enable IPv4, "yes" or "no".
do-ip4: yes

# Enable IPv6, "yes" or "no".
# do-ip6: yes

# Enable UDP, "yes" or "no".
    do-udp: yes

# Enable TCP, "yes" or "no".
    do-tcp: yes



access-control: 0.0.0.0/0 allow

# chroot: "/etc/unbound"


# username: "unbound"


# directory: "/etc/unbound"

# the log file, "" means log to stderr.
# Use of this option sets use-syslog to "no".
logfile: "/var/log/unbound/unbound.log"

forward-zone:
name: "."
forward-addr: 8.8.4.4
forward-addr: 8.8.8.8  

The LOG FILE DOES EXIST IN THE GIVEN DIRECTORY AND I HAVE TAKEN OWNERSHIP UNDER USER UNBOUND USING CHOWN . BUT WHEN I MAKE A QUERY, THE LOGFILE IS STILL EMPTY CAN ANYONE HELP ME? THANKS IN ADVANCE.

PLATFORM: UBUNTU 18 DESKTOP

migrated from serverfault.com Oct 11 at 17:00

This question came from our site for system and network administrators.

  • Don't scream (use proper capitalization). – Sven Oct 11 at 16:58
  • Just wanted to highlight some stuff – Mathew Oct 12 at 13:18

You need to set a proper verbosity level. 3 should be sufficient.

verbosity: <number>
          The verbosity number, level 0 means no verbosity,  only  errors.
          Level  1  gives  operational information. Level 2 gives detailed
          operational information. Level 3 gives query level  information,
          output  per  query.   Level 4 gives algorithm level information.
          Level 5 logs client identification for cache misses.  Default is
          level  1.  The verbosity can also be increased from the command-
          line, see unbound(8).
  • I have done this but the logfile still remains empty . – Mathew Oct 13 at 15:59

You are running in a chroot environment (/etc/unbound), which means your log should actually be kept at /etc/unbound/var/log/unbound/unbound.log. Is this where you are looking for it?

  • Hey i have done this but this didnt work. – Mathew Oct 12 at 13:17

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.