Sunday, January 1, 2017

How make DNS Server with DNSMASQ Centos 7.x 64bit Linux

Posted by Unknown
hi i want to share a little configuration if u want build dns server powerfull. yess that'is a dnsmasq..

first we install dnsmasq in your server

yum install dnsmasq

then we add a new configuration in folder /etc/dnsmasq.d/dns.conf

add code below like this

listen-address=YOUR-IP-ADDRESS
port=53
bind-interfaces
user=dnsmasq
group=dnsmasq
pid-file=/var/run/dnsmasq.pid
log-facility=/var/log/dnsmasq.log
log-queries
domain-needed
bogus-priv
no-hosts
dns-forward-max=500
cache-size=1000
#no-negcache
neg-ttl=3600
resolv-file=/etc/resolv.dnsmasq
no-poll


finish we save, then we add more configuration for dns cache query with filename /etc/resolv.dnsmasq

nameserver 8.8.8.8
nameserver 8.8.4.4

save.

last we add a host to direct ip to domain name like this.
192.168.1.10 learnbybit.com
192.168.1.11 mail.learnbybit.com

save.


we can restart service like this
service dnsmasq restart..

done ... u can try. :)


Read More