title: How to route only local addresses using dnsmasq
body: <p>I'm trying to have the dnsmasq of a server only listen to and respond to queries within a local network using their private IP addresses. All of the hosts needed are already on the /etc/host file, so all I need to do is configure the dnsmasq.conf file so that it only responds to local-only domains.</p>
  <p>While researching, I've only found documents for &quot;How to create a DNS/DHCP server using dnsmasq&quot; but not much on routing to only certain IP addresses.</p>
  <p>I've tried the instructions from this link:
  <a href="https://www.linux.com/training-tutorials/dnsmasq-easy-lan-name-services/" rel="nofollow noreferrer">https://www.linux.com/training-tutorials/dnsmasq-easy-lan-name-services/</a>
  and it put dnsmasq in a failed state.</p>
  <p>When I used listen-address=[private ip] in the dnsmasq.conf file, I did nslookup for the servers that are supposed to be on the private network but it been showing the public ip for the server and address.</p>