Ubuntu Server Guide Changes, errors and bugs
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
Troubleshooting
This section covers diagnosing problems with DNS and BIND9 configurations. 157 Testing resolv.conf The first step in testing BIND9 is to add the nameserver’s IP Address to a hosts resolver. The Primary nameserver should be configured as well as another host to double check things. Refer to DNS client configuration for details on adding nameserver addresses to your network clients. In the end your nameserver line in /etc/resolv .conf should be pointing at 127.0.0.53 and you should have a search parameter for your domain. Something like this: nameserver 1 2 7 . 0 . 0 . 5 3 s e a r c h example . com To check which DNS server your local resolver is using, run: systemd−r e s o l v e −−s t a t u s Note You should also add the IP Address of the Secondary nameserver to your client configuration in case the Primary becomes unavailable. dig If you installed the dnsutils package you can test your setup using the DNS lookup utility dig: • After installing BIND9 use dig against the loopback interface to make sure it is listening on port 53. From a terminal prompt: d i g −x 1 2 7 . 0 . 0 . 1 You should see lines similar to the following in the command output: ; ; Query time : 1 msec ; ; SERVER: 1 9 2 . 1 6 8 . 1 . 1 0 # 5 3 ( 1 9 2 . 1 6 8 . 1 . 1 0 ) • If you have configured BIND9 as a Caching nameserver “dig” an outside domain to check the query time: d i g ubuntu . com Note the query time toward the end of the command output: ; ; Query time : 49 msec After a second dig there should be improvement: ; ; Query time : 1 msec ping Now to demonstrate how applications make use of DNS to resolve a host name use the ping utility to send an ICMP echo request: p i n g example . com This tests if the nameserver can resolve the name ns.example.com to an IP Address. The command output should resemble: 158 PING ns . example . com ( 1 9 2 . 1 6 8 . 1 . 1 0 ) 5 6 ( 8 4 ) b y t e s o f data . 64 b y t e s from 1 9 2 . 1 6 8 . 1 . 1 0 : icmp_seq=1 t t l =64 time =0.800 ms 64 b y t e s from 1 9 2 . 1 6 8 . 1 . 1 0 : icmp_seq=2 t t l =64 time =0.813 ms named-checkzone A great way to test your zone files is by using the named−checkzone utility installed with the bind9 package. This utility allows you to make sure the configuration is correct before restarting BIND9 and making the changes live. • To test our example Forward zone file enter the following from a command prompt: named−c h e c k z o n e example . com / e t c / bind /db . example . com If everything is configured correctly you should see output similar to: zone example . com/IN : l o a d e d s e r i a l 6 OK • Similarly, to test the Reverse zone file enter the following: named−c h e c k z o n e 1 . 1 6 8 . 1 9 2 . in−addr . arpa / e t c / bind /db . 1 9 2 The output should be similar to: zone 1 . 1 6 8 . 1 9 2 . in−addr . arpa /IN : l o a d e d s e r i a l 3 OK Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling