DNS Server on CentOS7#
DNS: Domain Name System
Experimental Environment#
- CentOS7: 192.168.0.1
- Windows7: 192.168.0.100
Experimental Steps#
-
Configure network environment (connect network cable, configure IP address, 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 DNS service:
systemctl restart named
-
Test DNS on the client side (configure the client first, specify the DNS server; test if the port can be connected, finally test using the
nslookup
command)