企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# master(主服务器模式) ## Server:192.168.1.211 ``` yum -y install bind [bind-utils bind-libs] vim /etc/named.conf listen-on port 53 { any; }; allow-query { any; }; ....... dnssec-enable no; dnssec-validation no; dnssec-lookaside no; ....... zone "example.com" IN { type master; file "example.com"; }; zone "1.168.192.in-addr.arpa" IN { type master; file "1.168.192.zone"; }; cd /var/named cp named.localhost example.com cp named.loopback 1.168.192.zone chgrp named example.com 1.168.192.zone vim example.com $TTL 1D @ IN SOA dns.example.com. root.example.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS dns.example.com. dns IN A 192.168.1.211 @ IN MX 5 mail.example.com. mail IN A 192.168.1.211 www IN A 192.168.1.211 ftp IN CNAME www vim 1.168.192.zone $TTL 1D 1.168.192.addr-in.arpa. IN SOA dns.example.com. root.example.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS dns.example.com. 211 IN PTR dns.example.com. @ IN MX 5 mail.example.com. 211 IN PTR mail.example.com. 211 IN PTR www.example.com. firewall-cmd --permanent --add-service=dns firewall-cmd --reload systemctl start named.service ``` ## Desktop:192.168.1.210 ``` vim /etc/resolv.conf nameserver 192.168.1.211 nslookup >www.wdoe.com >192.168.1.211 >set type=mx|ns|soa >example.com >exit dig www.example.com dig -x 192.168.1.211 dig -t mx|ns|soa example.com host www.example.com host 192.168.1.211 host -t mx|ns|soa example.com ```