- apt -y install bind9 bind9utils dnsutils
vim named.conf.local zone "MyDomain.it" IN { type master; file "MyDomain.it"; };
vim named.conf.options options { // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // forwarders { // 0.0.0.0; // }; //======================================================================== // If BIND logs error messages about the root key being expired, // you will need to update your keys. See https://www.isc.org/bind-keys //======================================================================== directory "/var/cache/bind"; listen-on port 53 {localhost;10.0.20.0/24;192.168.40.0/24; }; allow-query {localhost;10.0.20.0/24;192.168.40.0/24;}; recursion yes; forwarders {192.168.100.12; }; dnssec-validation auto; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; };
vim /var/cache/bind/domain.ir $TTL 86400 @ IN SOA ns1.MyDomain.it. root.MyDomain.it( 20191214 ;Serial 3600 ;Refresh 900 ;Retry 604800 ;Expired 86400 ;Minimum TTL ) ;name servers - NS records IN NS ns1.MyDomain.it. IN A 192.168.40.40 IN MX 10 mail.MyDomain.it. ;name servers - A records ns1.MyDomain.it. IN A 192.168.40.40 dns.MyDomain.it. IN A 192.168.40.40 root.MyDomain.it. IN A 192.168.40.40 MyDomain.it. IN A 192.168.40.40 chat.MyDomain.it. IN A 192.168.40.41 mail.MyDomain.it. IN A 192.168.40.42 email.MyDomain.it. IN A 192.168.40.42 pop3.MyDomain.it. IN A 192.168.40.42 smtp.MyDomain.it. IN A 192.168.40.42 imap.MyDomain.it. IN A 192.168.40.42 behrooz.MyDomain.it. IN A 192.168.40.48
- برای اینکه هر کوئری که به سرور دی ان اس زده میشود لاگ شود دستور زیر را در سرور وارد نمایید
# rndc querylog on
درباره این سایت