Tuesday, November 22, 2011

DNS(dnsmasq) on Fedora machine

Steps to Install and configure local DNS(dnsmasq) on Fedora machine

Server side
1, Download the dnsmasq software package from site http://www.thekelleys.org.uk/dnsmasq/ 
      Untar it and compile it
      # tar -zxvf
      # cd
      # make
    Or you can simply do 
      # yum install dnsmasq

2, Start service
      # /etc/init.d/dnsmasq start

3, Append domain name and dhcp range information in /etc/dnsmasq.conf file
      For example:

4, Append the dns entries in /etc/hosts file
      For example testhost1 testhost2

5, Stop the iptables
      #service iptables stop

6, Restart the dnsmasq service
      # /etc/init.d/dnsmasq restart

Client side
1, Change nameserver IP address in /etc/resolv.conf file, Remove existing nameserver IP addresses and give the IP address of machine which is running dnsmasq

2, Send dns request
      # host testhost1 
It will give you the corresponding IP address you have configured in /etc/hosts file in dnsmasq server configuration. 

For further clarifications you can visit http://www.enterprisenetworkingplanet.com/netos/article.php/10951_3377351_1