0

I have configured my DNS server with logging channel but still log is writing to /var/log/message file.

options {

// Default zone file directory for this dns server
directory "/var/named";

// Who can perform queries against this dns server and get answers  (default: any)
allow-query { any; };

// Do we permit recursion for our internal hosts, and retrieve data from the cache for them? (default: no)
recursion yes;

listen-on { any; };

// Who can get entire zone files from this dns server (default : none)
allow-transfer {
127.0.0.1;
10.10.100.3;
};

// How many recursive clients does this dns support per second? (the default is 1000)
recursive-clients 100;

// Do we notify zone changes? Prevent DoD attacks (default: no)
notify yes;

// specifies which hosts are allowed to get answers from the cache (default: any)
allow-query-cache { any; };

// Does this server using two or more master servers? (default: yes)
multi-master yes;

// sets the maximum time (in seconds) for which the server will cache negative (NXDOMAIN) answers
max-ncache-ttl 300; //5min

// Hide version number (default: "")
version "";

// bombing sources add here (default: none)
blackhole { none; };
};

logging {
channel bindlog {
file "/var/log/querylog" versions 3 size 5m;
print-time yes;
print-category yes;
print-severity yes;
};
category xfer-out { bindlog;};
category xfer-in { bindlog;};
category security { bindlog;};
};

// we are the master server for gani.com
zone "gani.com" IN {
type master;
file "master/gani.com.frwd.db";

};

zone "100.10.10.in-addr.arpa" IN {
type master;
file "master/gani.com.rev.db";

};
  • logging { channel bindlog { file "/var/log/querylog" versions 3 size 5m; print-time yes; print-category yes; print-severity yes; }; category xfer-out { bindlog;}; category xfer-in { bindlog;}; category security { bindlog;}; }; // we are the master server for gani.com zone "gani.com" IN { type master; file "master/gani.com.frwd.db"; }; – Ganesh-vrc Aug 15 '16 at 16:05
  • You should add information to your question directly by clicking the edit link below it. – Julie Pelletier Aug 15 '16 at 16:23
0

/var/log/messages is typically managed by the syslog daemon, so likely your bind is configured with the default syslog channel for logging (see the "BIND 9 Administrator Reference Manual", section 6.2.10.1). In testing, even with:

logging {
  category default { default_debug; };
  ...
};

Some of the BIND startup messages were still sent to syslog (for BIND 9.10 via MacPorts on Mac OS X), though I'm not sure what logs in syslog you are seeing or why they are a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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