10.2. Extending SELinux policy for BIND custom logging
You can extend the SELinux policy to include the BIND logs.
Procedure
Create a log directory:
# mkdir -p /var/log/named # chown named:named /var/log/named # chmod 750 /var/log/namedAssign the
named_log_tSELinux context to the new directory and the log file:# semanage fcontext -a -t named_log_t "/var/log/named(/.*)?" # restorecon -Rv /var/log/namedRestart the BIND server:
# systemctl restart named
Verification
Display your custom log file:
$ tail -f /var/log/named/ipa_dns_queries.log