nerdexam
Red_Hat

RH302 · Question #93

99: Configure the DNS for example.com domain, where 192.100.0.20 is associated IP for www and NS is 192.100.0.X where X is your IP.

Answers: 1. rename the file named.caching-nameserver.conf into named.conf file located into /var/named/chroot/etc #mv /var/named/chroot/etc/named.caching-nameserver.conf /var/named/chroot/etc/named.conf 2. Check the permission and ownership as well as SELinux Context should be…

Network configuration

Question

99: Configure the DNS for example.com domain, where 192.100.0.20 is associated IP for www and NS is 192.100.0.X where X is your IP.

Explanation

Answers:

  1. rename the file named.caching-nameserver.conf into named.conf file located into /var/named/chroot/etc #mv /var/named/chroot/etc/named.caching-nameserver.conf /var/named/chroot/etc/named.conf
  2. Check the permission and ownership as well as SELinux Context should be like as: -rw-r----- root named system_u:object_r:named_conf_t If selinux context is mismatch use the restorecon -R /var command
  3. vi /var/named/chroot/etc/named.conf zone "example.com" IN { type master; file "example.com.zone"; }; /var/named/chroot/etc/named.conf file is used to register the zone as well as specify the global option for DNS server. There are two types of zone, i. Master, which contains the original data. ii. Slave, backup of master. Here is the example of master zone configuration.
  4. vi /var/named/chroot/var/named/example.com.zone $TTL 345345 @ IN SOA @ webmaster.example.com.( 101; Serial Number 1H; Refresh Time 1M; Retry Time 1W; Expire Time 1D; Minimum Time to Live ) @ IN NS 192.100.0.X www IN A 192.100.0.20
  5. Check the permission as well as SELinux Context should be like this: -rw-r--r-- root named root:object_r:named_zone_t /var/named/chroot/var/named/example.com.zone If selinux context is mismatch use the restorecon -R /var command
  6. service named start
  7. rndc reload
  8. chkconfig named on Zone file should create on /var/named/chroot/var/named. Default Directory Path is specified on /var/named/chroot/etc/named.conf file. $TTL Time To Live, How much seconds cache server stores the information about DNS. And Five Parameters specified Serial Number used by slave to synchronize with master server. Refresh and Retry Time used by slave server. NS is the Name (DNS) server where lookup the domain. A (Associated IP) for particular host.

Topics

#DNS#BIND#zone file#A records

Community Discussion

No community discussion yet for this question.

Full RH302 Practice