[zimbra@mail ~]$ zmcontrol -v
Release 8.8.11_GA_3737.RHEL7_64_20181207111719 RHEL7_64 FOSS edition.
[root@mail ~]# hostnamectl
Static hostname: mail.szyhx.xyz
Icon name: computer-vm
Chassis: vm
Machine ID: 75a5cc76eddb45d3b66aaa29b6f2fc2f
Boot ID: 3a3c1758c3e94c539385da77ca7813af
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.5.1.el7.x86_64
Architecture: x86-64
以上为服务器版本信息
[root@mail ~]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1;192.168.101.105; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
# recursing-file "/var/named/data/named.recursing";
# secroots-file "/var/named/data/named.secroots";
# allow-query { localhost; };
allow-transfer { 192.168.101.0/24; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
# recursion yes;
dnssec-enable no;
dnssec-validation no;
/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";
# managed-keys-directory "/var/named/dynamic";
# pid-file "/run/named/named.pid";
# session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "mail.szyhx.xyz" IN {
type master;
file "szyhx.xyz";
allow-update { none; };
};
zone "101.168.192.in-addr.arpa" IN {
type master;
file "192.168.101.arpa";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
[root@mail ~]# cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
[root@mail ~]# cat /var/named/szyhx.xyz
$TTL 600
@ IN SOA szyhx.xyz. root. (
2019031; serial
1D ; refresh
1H ; retry
1W ; expire
3H ; minimum
)
@ In A 192.168.101.105
@ IN NS ns.szyhx.xyz.
IN MX 10 mail.szyhx.xyz.
ns IN A 192.168.101.105
mail IN A 192.168.101.105
[root@mail ~]# cat /var/named/192.168.101.arpa
$TTL 1D
@ IN SOA @ rname.invalid. (
03010 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS ns.szyhx.xyz.
105 PTR ns.szyhx.xyz.
105 PTR mail.szyhx.xyz.
[root@mail ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search szyhx.xyz
#nameserver 202.96.128.166
#nameserver 202.96.134.33
mail.szyhx.xyz 192.168.101.105
nameserver 192.168.101.105
安装完之后