User Tools

Site Tools


dns:bind_configure_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dns:bind_configure_guide [2022/11/23 12:49] – external edit 127.0.0.1dns:bind_configure_guide [2025/12/15 12:43] (current) – [Logging] bstafford
Line 9: Line 9:
  
 On Ubuntu 16.04, you need to  On Ubuntu 16.04, you need to 
-<code>sudo apt-get install bind9 bind9utils bind9-doc</code>+<code>sudo apt-get install bind9 bind9utils bind9-doc dnsutils</code> 
 + 
 +=====Troubleshooting ===== 
 +<code>named-checkconf</code> 
 +<code>named-checkzone yourdomain.tld /etc/bind/zones/name-of-file.db</code> 
 +===== Other =====
  
 Then <code>vi /etc/bind/named.conf.options</code> Then <code>vi /etc/bind/named.conf.options</code>
Line 110: Line 115:
 <code>tail -f /var/log/syslog</code> <code>tail -f /var/log/syslog</code>
 Also Also
 +
 +<code>sudo mkdir /var/log/named
 +sudo chown bind:bind /var/log/named
 +sudo chmod ug+w /var/log/named</code>
 +
 +
 +''NOTE'' Use ''/var/log/named/'' for logging folder otherwise you will encounter issues with AppArmor
 <code>user@hostname:/etc/bind# cat named.conf.options <code>user@hostname:/etc/bind# cat named.conf.options
 options { options {
Line 130: Line 142:
 logging { logging {
         channel bind_default_log {         channel bind_default_log {
-                file "/var/log/bind/default.log" versions 3 size 5m;+                file "/var/log/named/default.log" versions 3 size 5m;
                 //severity debug 9;                 //severity debug 9;
                 severity info;                 severity info;
Line 139: Line 151:
  
         channel bind_update_log {         channel bind_update_log {
-                file "/var/log/bind/update.log" versions 3 size 5m;+                file "/var/log/named/update.log" versions 3 size 5m;
                 //severity debug 9;                 //severity debug 9;
                 severity info;                 severity info;
Line 148: Line 160:
  
         channel bind_update-security_log {         channel bind_update-security_log {
-                file "/var/log/bind/update-security.log" versions 3 size 5m;+                file "/var/log/named/update-security.log" versions 3 size 5m;
                 //severity debug 9;                 //severity debug 9;
                 severity info;                 severity info;
Line 157: Line 169:
  
         channel bind_security_log {         channel bind_security_log {
-                file "/var/log/bind/security.log" versions 3 size 5m;+                file "/var/log/named/security.log" versions 3 size 5m;
                 //severity debug 9;                 //severity debug 9;
                 severity info;                 severity info;
Line 166: Line 178:
  
         channel bind_query_log {         channel bind_query_log {
-                file "/var/log/bind/query.log" versions 3 size 5m;+                file "/var/log/named/query.log" versions 3 size 5m;
                 //severity debug 10;                 //severity debug 10;
                 severity info;                 severity info;
Line 175: Line 187:
  
         channel bind_lame-servers_log {         channel bind_lame-servers_log {
-                file "/var/log/bind/lame-servers.log" versions 3 size 5m;+                file "/var/log/named/lame-servers.log" versions 3 size 5m;
                 //severity debug 9;                 //severity debug 9;
                 severity info;                 severity info;
Line 183: Line 195:
         };         };
  
-        category default { bind_query_log; }; +        category default { bind_default_log; }; 
-        category update { bind_query_log; }; +        category update { bind_update_log; }; 
-        category update-security { bind_query_log; }; +        category update-security { bind_update-security_log; }; 
-        category security { bind_query_log; };+        category security { bind_security_log; };
         category queries { bind_query_log; };         category queries { bind_query_log; };
-        category lame-servers { bind_query_log; };+        category lame-servers { bind_lame-servers_log; };
 }; };
 </code> </code>
dns/bind_configure_guide.1669207782.txt.gz · Last modified: by 127.0.0.1