Este conteúdo não está disponível no idioma selecionado.

Chapter 10. Customizing BIND logging


As Identity Management (IdM) administrator, you can improve visibility and maintain security by customizing where BIND writes its logs and ensuring SELinux allows access to those custom paths.

10.1. Customizing the BIND log path

You can customize the path to your BIND logs by using the ipa-logging-ext.conf file.

Procedure

  1. Open the ipa-logging-ext.conf file in the /etc/named/ directory and add or modify a logging channel with your file path:

    Copy to Clipboard Toggle word wrap
    logging {
    	channel ipa_custom_log {
            file "/var/log/named/ipa_dns_queries.log" versions 3 size 10m;
        	severity info;
        	print-time yes;
        	print-severity yes;
        	print-category yes;
    	};
    
    	category queries { ipa_custom_log; };
    	category update { ipa_custom_log; };
    	category update-security { ipa_custom_log; };
    };
  2. Restart the BIND server:

    Copy to Clipboard Toggle word wrap
    # systemctl restart named

10.2. Extending SELinux policy for BIND custom logging

You can extend the SELinux policy to include the BIND logs.

Procedure

  1. Create a log directory:

    Copy to Clipboard Toggle word wrap
    # mkdir -p /var/log/named
    # chown named:named /var/log/named
    # chmod 750 /var/log/named
  2. Assign the named_log_t SELinux context to the new directory and the log file:

    Copy to Clipboard Toggle word wrap
    # semanage fcontext -a -t named_log_t "/var/log/named(/.)?"*
    # restorecon -Rv /var/log/named
  3. Restart the BIND server:

    Copy to Clipboard Toggle word wrap
    # systemctl restart named

Verification

  • Display your custom log file:

    Copy to Clipboard Toggle word wrap
    $ tail -f /var/log/named/ipa_dns_queries.log
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat, Inc.