Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Forward Zone File
Caching Nameserver
The default configuration acts as a caching server. Simply uncomment and edit /etc/bind/named.conf. options to set the IP addresses of your ISP’s DNS servers: f o r w a r d e r s { 1 . 2 . 3 . 4 ; 5 . 6 . 7 . 8 ; } ; Note Replace 1.2.3.4 and 5.6.7.8 with the IP Addresses of actual nameservers. To enable the new configuration, restart the DNS server. From a terminal prompt: sudo s y s t e m c t l r e s t a r t bind9 . s e r v i c e See dig for information on testing a caching DNS server. Primary Server In this section BIND9 will be configured as the Primary server for the domain example.com. Simply replace example.com with your FQDN (Fully Qualified Domain Name). Forward Zone File To add a DNS zone to BIND9, turning BIND9 into a Primary server, first edit /etc/bind/named.conf.local: zone ” example . com” { type master ; f i l e ”/ e t c / bind /db . example . com ” ; } ; Note If bind will be receiving automatic updates to the file as with DDNS, then use /var/lib/bind /db.example.com rather than /etc/bind/db.example.com both here and in the copy command below. Now use an existing zone file as a template to create the /etc/bind/db.example.com file: sudo cp / e t c / bind /db . l o c a l / e t c / bind /db . example . com Edit the new zone file /etc/bind/db.example.com and change localhost . to the FQDN of your server, leaving the additional . at the end. Change 127.0.0.1 to the nameserver’s IP Address and root. localhost to a valid email address, but with a . instead of the usual @ symbol, again leaving the . at the end. Change the comment to indicate the domain that this file is for. Create an A record for the base domain, example.com. Also, create an A record for ns.example.com, the name server in this example: ; ; BIND data f i l e f o r example . com ; $TTL 604800 156 @ IN SOA example . com . r o o t . example . com . ( 2 ; S e r i a l 604800 ; R e f r e s h 86400 ; Retry 2419200 ; E x p i r e 604800 ) ; N e g a t i v e Cache TTL @ IN NS ns . example . com . @ IN A 1 9 2 . 1 6 8 . 1 . 1 0 @ IN AAAA : : 1 ns IN A 1 9 2 . 1 6 8 . 1 . 1 0 You must increment the Serial Number every time you make changes to the zone file. If you make multiple changes before restarting BIND9, simply increment the Serial once. Now, you can add DNS records to the bottom of the zone file. See Common Record Types for details. Note Many admins like to use the last date edited as the serial of a zone, such as 2020012100 which is yyyymmddss (where ss is the Serial Number) Once you have made changes to the zone file BIND9 needs to be restarted for the changes to take effect: sudo s y s t e m c t l r e s t a r t bind9 . s e r v i c e Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling