Thursday, May 19, 2016

fast way to setup dns server

dnsmasq is a lightweight DNS, TFTP, PXE, router advertisement and DHCP server. And it is very easy and fast to setup those services up and running.

1- install dnsmasq on the system
$ sudo apt-get install dnsmasq

2- create a file /etc/resolv.dnsmasq.conf with the following content (list the dns server for dns forwarder in dnsmasq)

3- modify the dnsmasq configuration file /etc/dnsmasq.conf as below


4- to start the dnsmasq service just run the dnsmasq with root permission,
$ sudo dnsmasq

5- to stop the service just kill its process with killall
$ sudo killall dnsmasq

6- and we can modify our /etc/resolv.conf file ot use with out newly setup dns as below

now with those configuration of setup 3 we got
- address as a record
- cname as cname record
- mx-host as mx record

7- test resolve name using host command
$ host has address mail is handled by 50

No comments:

Post a Comment