You are on page 1of 9
sovsr2019 How to Setup DNS (Bind) Server on GentOS/RHEL 7165 Gefbuutiase ‘HOME UBUNTU1804 —‘ TUTORIALS ABOUT US How to Setup DNS (Bind) Server on CentOS/RHEL 7/6/5 Written by Rahul, Updated on April 2, 2013 % Linux Tutorials | ® bind, dns, dns server, named The DNS (Domain Name System) is a distributed system, used for translate domain names to IP address and vice a versa.For example when we type domain name in browser url like “https://tecadmin.net”, Our computer sends a request to DNS and get an ip address of domain. This article will help you to step by step setup dns server on CentOS and RedHat systems. Network Scenario: * DNS Server IP: 192.168.1.254 hitps:ftecadmin netsetup-dns-server-on-centos-redhat! FUNNY TOOLS FEEDBACK st Oe UIcy PUPULAK PUSIS How To install MySQL on Debian 10 (Buster) Linux How To Upgrade Debian 9 to Debian 10 Buster How to Install PostgreSQL on Debian 10 (Buster) * How to Install Docker o.. Debian 10 (Buster) How To Install Go 112 on Macos 19 sonore How to Setup ONS (Bind) Server on CentOS/RHEL 7/65 * DNS Server Name: nsi.tecadmin.net, ns2.tecadmin.net * Domain Name: demotecadmin.net * Domain IP to point: 192.168.1.100 Step 1 - Install Bind Packages Bind packages are available under default yum repositories. To install packages simple execute below command. # yum install bind bind-chroot Step 2 - Edit Main Configuration File Default bind main configuration file is located under /etc directory. But using chroot environment this file is located at /var/named/chroot/etc directory. Now edit main configuration file and update content as below. # vim /var/named/chroot/etc/named.conf Content for the named.conf file // Ivar [named/chroot/etc/named.. cont options { Listen-on port 53 { 127.0.0.1; 192.168.1.0/24; Listen-on-v6 port 53 { ::15 }5 directory “/var/named” ; dump-file “/var/named/data/cache_dunp.db" statistics-file "/var/named/data/named_stats.tx menstatistics-file "/var/named/data/named_men_s allow-query —{ localhost; 192.168.1.0/24; @. recursion yess htps:tocadmin nelsetup-dns-server-on-centos-edhal! 219 sonore How to Setup ONS (Bind) Server on CentOSIRHEL 7/65 dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory “/var/named/dynamic"; logging { channel default_debug { file "data/named.run"; severity dynamic; % zone "." IN { type hint; file “naned.ca"; b zone “demotecadmin.net” IN { type master; file "/var/named/demotecadnin.net.db”; bb include */etc/naned.rfc1912.zones"; include */etc/naned.root -key"; Step 3 - Create Zone File for Your Domain After creating bind main configuration file, create a zone file for you domain as per configuration, for example demotecadmin.net.db in this article. # vim /var/named/chroot/var/named/demotecadmin.net.db htps:tecadmin nelsetup-dns-server-on-centos-edhal! a9 sonore How to Setup ONS (Bind) Server on CentOS/RHEL 7/65 Content for the zone file 3 Zone file for demotecadmin.net $TTL 14400 e 86400 IN SOA nsi.tecadmin.net. webma 3013040200 3 serial, todays datest 86400 3 refresh, seconds 7200 3 retry, seconds 3600000 3 expire, seconds 86400 3 minimum, seconds d demotecadmin.net. 86400 IN NS ns1.tecadnin.net. demotecadmin.net. 86400 IN NS ns2. tecadmin.net. demotecadmin.net. IN A 192.168.1.100 demotecadmin.net. IN MX @ mail.demotecadmin.net. mail IN CNAME demotecadmin.net. wi IN CNAME demotecadmin.net. If you are having more domain, its required to create zone files for each domain individually. Step 4 -— Add More Domains To add more domains in dns, create zone files individually for all domain as above. After that add any entry for all zones in named.conf like below. Change demotecadmin.net with your domain name. zone “demotecadmin.net” IN { type master; file "/var/named/denotecadmin.net.db"; b Step 5 - Start Bind Service htps:tecadmin nelsetup-dns-server-on-centos-edhal! 49 soiszor8 Hom o Setup ONS (Bind) Server on CenOSIRHEL. 765 Start named (bind) service using following command. | # service naned restart | Enable auto start on system boot. | # chkconfig named on | Step 6 —- Test Your DNS Setup Send query to your dns server directly using below command. synta name/ip> nslookup REPLY TO DRAGONGANG March 1, 2014 at 8:46 am Many Many thanks bro, ODESSA > REPLY TO ODESSA January 9, 2014 at 12:31 pm Everything is very open with a very clear description of the challenges, It was definitely informative. Your website is very useful Thanks for sharing! MONTRE GUESS FEMME. ‘© REPLY TO MONTRE November 1, 2013 at 7:14 am Grwat post. I was checking continuously this weblog and I'm impressed! Very useful info specifically the last section © 1 handle such information much. I was ‘seeking this certain information for a long time. Thanks and best of luck. RAHUL ‘ REPLY TO RAHUL August 27, 2013 at 2:27 pm Thanks Muditha, htps:tecadmin nelsetup-dns-server-on-centos-edhal! as sonore How to Setup ONS (Bind) Server on CentOS/RHEL 7/65 r ) MUDITHA ‘© REPLY TO MUDITHA July 22, 2013 at 11:50 am 1% a lot for this comprehensive tutorial, I am absolute beginner for bind a website using ssh (also newbie to linux). Got the final sample output and waiting for propagating it trough the Internet. I want to point out small mistake also. In zone file *)” is seems to be in wrong place. Thanks again LEAVE A REPLY COMMENTS * NAME * Copyright © 20 EMAIL * WEBSITE No soy un robot reCAPTOHA, SUBMIT htps:tecadmin nelsetup-dns-server-on-centos-edhal! 019 TecAdmin.net. All Rights Reserved, This site uses cookie e with our term and services . By using this

You might also like