Sei sulla pagina 1di 11

7/3/2017 How To Configure DNS Server In Ubuntu 17.

04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies OKAY MORE INFO
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS

BEST SELLING BOOKS

CCNA GNS3 LABS VMWARE VIRTUALBOX WINDOWS LINUX AWS CLOUD

BLOGGING TUTORILAS

Homepage » How To Con gure DNS Server In Ubuntu 17.04 Linux

Serial Numbers Windows 10 Free sms text message Guides

MAY 7, 2017 BY PROTECHGURUS

How To Configure DNS Server In Ubuntu 17.04 Linux

The actual communication between two systems happens with the help of IP


addresses. However, remembering IP addresses of each system is di cult,
especially when there are millions of websites and domain servers exist.

Domain Name Server (DNS) is a service that allows you to create a mapping
table that resolves IP addresses to the respective domain names. The full
domain name is consists of a hostname and a domain name. It also referred

as Fully Quali ed Domain Name (FQDN). In this tutorial, we are going to


explain how to con gure DNS server in Ubuntu Linux. We are using the
latest version of Ubuntu that is Ubuntu 17.04. However, the same steps can

also be used to con gure DNS server in other Linux variants and other
versions of Ubuntu such as Ubuntu 16.04 and Ubuntu 14.04.

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 1/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

Also, read:
P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

Con gure DNS server in Windows Server 2016 AMAZON EXCLUSIVE DEALS

Con gure DHCP server in Ubuntu 17.04

The following three types of DNS servers can be con gured on a Linux
system.

1. Caching-only DNS server

2. Primary DNS server


3. Secondary DNS server

1. Con guring Caching-only DNS server in Ubuntu


Linux
Caching-only DNS server does not host its own DNS zone data. When a

domain name query is resolved by a client, caching name server stores the
resolved queries in its cache. When the same query is requested by another

client, caching name server answers the query from its cache thus reducing

the query resolve time.

In order to con gure caching-only DNS server in Ubuntu Linux, the


following steps need to be followed.

Installing DNS Server Packages


In the Linux systems, for DNS server, you need to install bind9 and dnsutils
packages using the following commands:

sudo apt install bind9


sudo apt install dnsutils

Updating named.conf File

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 2/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

After installing the required packages, you need to modify the DNS server
P R OT E C H G U R U S
This website uses cookies
con guration
Learn By le.
Self Most ofBy
| Served the Ubuntu and other Linux platforms, the main
Experts

DNS con guration le is /etc/bind/named.conf. AMAZON EXCLUSIVE DEALS

Con guring caching-only DNS server is pretty simple. In fact, the

/etc/bind/named.conf.options le is already con gured to act as the caching-


only name server. You just need to replace the current IP address with your

upside DNS server IP address in the /etc/bind/named.conf.options le. The

following gure shows how to con gure caching-only DNS server in Ubuntu.

After updating the DNS con guration le, restart the DNS service, and verify

that the service is running properly.

sudo systemctl restart bind9.service


sudo systemctl status bind9.service

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 3/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

That’s all you need to con gure caching name server in Ubuntu Linux. Isn’t
P R OT E C H G U R U S
This website uses cookies
it so easy?
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS

Con gure Primary Master DNS Server


To con gure primary master DNS server in Ubuntu Linux, you need to
update the /etc/bind/named.conf.local con guration le. In this le, you

con gure DNS forward lookup and reverse lookup zone. Forward lookup

zone is used to resolve an FQDN name to IP address and reverse lookup zone

is used to resolve IP address to the FQDN name.

Recommended: Con gure LAMP in Ubuntu Linux

Con gure Forward Lookup Zone Options

We assume that protechgurus.com is your domain name and

db.protechgurus.com would your zone data le name. Considering this, the

DNS con guration le for the primary master DNS server should look like

the following.

zone "protechgurus.com" {
type master;
file "/etc/bind/db.protechgurus.com";

};

Creating Forward Lookup Zone Data File


Now, you need to create a zone le that you have mentioned in the previous

le, named as db.protechgurus.com, under the /etc/bind directory. To

simplify your tasks, you can use the /etc/bind/db.local template le to create

/etc/bind/db.protechgurus.com le.

sudo cp /etc/bind/db.local /etc/bind/db.protechgurus.com

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 4/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

Now edit the zone le as per your network settings. Replace the highlighted
P R OT E C H G U R U S
This website uses cookies
text with your
Learn Byactual DNS By
Self | Served server IP address and domain name.
Experts

AMAZON EXCLUSIVE DEALS

In the above le, whenever you make any changes, you also need to increase

the serial number by plus 1 (+1).

Finally, save the zone le and restart the DNS service.

sudo systemctl restart bind9.service

Configuring Reverse Lookup Zone


Once you con gured and updated the forward lookup zone, the next step is

to con gure reverse lookup zone. In the DNS con guration le, add the

reverse lookup zone entry. In our example, the reverse lookup zone name is
0.16.172.in-addr-arpa and the zone data le name is db.172.16. The nal

content of the /etc/bind/named.conf.local le should look like as follow:

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 5/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS

Like the forward lookup zone, you also need to create and update the reverse

lookup zone le named as /etc/bind/db.172.16. For this, copy the template le

as /etc/bind/db.172.16 and update the le content as shown below.

Similar to the forward lookup zone, whenever there a modi cation happens
in the reverse lookup zone le, you need to increase the serial number by +1
each time.

Before proceeding further, please check that your zones are con gured

properly and the syntax of the con guration le is OK. For this, execute the
commands as shown in the following gure.

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 6/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS

Finally, restart the bind the service. If everything goes ne, the service

should start and status should be shown as running.

sudo systemctl restart bind9.service

sudo systemctl status bind9.service

Verifying DNS Server Configuration


Now, you have successfully con gured caching-only and primary master

DNS server in Ubuntu Linux. We will cover secondary DNS server in a


separate tutorial.

Now to further verify, execute the following commands:

dig <your-domain-name>

ping <your-domain-name>
ping <ns.your-domain-name>

We recommend you to spend some time with the above commands and
review the output details of each command.

Do subscribe us to stay connected with us and get noti ed for upcoming


tutorials.

Answers Online phone directory Windows Xp Address

You may also like:

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 7/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS

CCNA 200-125 Install a Domain Con guring Static CCNA Exam 200-
Study Guide PDF Controller Using IP Address in RHEL 125 - Fees,
Free Download IFM in Windows 7 Using CLI - Step Syllabus, and Other
Server 2016 By Step Guide Details

How To Con gure Con gure Domain How To Fix How To Con gure
DHCP In Ubuntu Controller in DNS_PROBE_FINISHED_NXDOMAIN
Network Load
17.04 - Step By Step Windows Server Error [Solved] Balancing In
2016 Windows Server
2016

Ad s b y Sh a r ea h ol i c

Share this:

   9

❮❮ PREVIOUS POST NEXT POST ❯ ❯

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 8/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

Search
A Mthis
AZO website
N E X… 
CLUSIVE DEALS

CCNA LAB MANUAL GUIDE

CCNA Routing
and Switching...
$3.99

Shop now

LIKE US

Protechgurus
823 likes

Like Page Selengkapnya

NEWSLETTER

Email address:

Your email address

SIGN UP

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 9/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies
Learn By Self | Served By Experts

AMAZON EXCLUSIVE DEALS


RECENT POSTS

install kde in

ubuntu/fedora/rhel/centos/open suse

how to install vlc in ubuntu linux

how to install team viewer in ubuntu

linux

how to upgrade ubuntu 16.04 to

ubuntu 17.04

setup password authentication with

apache in ubuntu linux

C AT E G O R I E S

aws cloud

blogging tutorilas

ccna

cisco

gns3 tutorials

internet tips

ipv6

juniper

linux

rhel

routing

scvmm

security

switching

ubuntu

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 10/11
7/3/2017 How To Configure DNS Server In Ubuntu 17.04 Linux | ProTechGurus

P R OT E C H G U R U S
This website uses cookies virtualbox

Learn By Self | Served By Experts vmware


AMAZON EXCLUSIVE DEALS
windows

windows 10

windows server 2016

CONTACT US TERMS AND CONDITIONS ABOUT US

P R E T T Y C H I C T H E M E B Y: P R E T T Y DA R N C U T E D E S I G N

https://protechgurus.com/configure-dns-server-ubuntu-17-04-linux/ 11/11

Potrebbero piacerti anche