DNS Server on CentOS7#
DNS: Domain Name Resolution System
Experimental Environment#
- CentOS7: 192.168.0.1
- Windows7: 192.168.0.100
Experimental Steps#
-
Configure the network environment (connect the network cable, configure IP addresses, disable firewall and SELinux on CentOS)
-
Install bind software on CentOS
-
Configure bind on CentOS (first configure
/etc/named.conf
, then configure/etc/named.rfc1912.zones
: define the names and paths of forward and reverse files, finally create and edit forward and reverse files in/var/named
)Domain Name--Forward-->IP
Domain Name<--Reverse--IPAssume: There is a website
www.pip.cc
(192.168.0.10) and an FTP serverftp.pip.cc
(192.168.0.20) in the current network. -
Restart the DNS service:
systemctl restart named
-
Test DNS on the client (configure the client first, specify the DNS server; test if the port can be connected, finally test using the
nslookup
command)