Logging statements w.r.t. view in Bind 9.16.18
Gaurav Kansal
gaurav.kansal at nic.in
Tue Aug 24 10:57:52 UTC 2021
Hi guys,
I want a clarity whether we can have individual logging statement per view basis ? Whatever i found on google, i think we can't.
My use case for separate logging statement is as follows -
In my recursive server, i have 2 views, one for my internal clients and one for Internet ; i am running Internet view just for catch hold of scanning IPs (type of honeypot).
Syntax of 2 views are as follows -
view "INTRANET" {
match-clients { PRIVATE.SEGMENTS ; };
recursion yes;
};
view "PUBLIC" {
match-clients { any; };
allow-query { none; } ;
recursion no;
};
My logging config is -
channel queries {
file "/var/log/log/queries";
severity info;
print-time yes;
print-category yes;
print-severity yes;
};
category queries {
queries;
};
channel query-errors {
file "/var/log/log/query-errors" versions 5 size 20m;
severity dynamic;
print-time yes;
print-category yes;
print-severity yes;
};
category query-errors {
query-errors;
};
channel default { file "/var/log/log/default" versions 5 size 20m; severity info; print-time yes; print-category yes; print-severity yes; };
category client { default ; } ;
category general { default ; } ;
category unmatched { default ; } ;
By this config, i am getting all the query logs (for both the views) in a single file and also i am getting REFUSED statements in query-errors category file.
I want to achieve to have separate query log file for each view and doesn't want to log REFUSED queries (which are for PUBLIC view) in query-error category.
please help how can i achieve this.
Thanks,
Gaurav Kansal
Disclaimer:
This e-mail and its attachments may contain official Indian Government information. If you are not the intended recipient, please notify the sender immediately and delete this e-mail. Any dissemination or use of this information by a person other than the intended recipient is unauthorized. The responsibility lies with the recipient to check this email and any attachment for the presence of viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20210824/75c42824/attachment.htm>
More information about the bind-users
mailing list