title: dnsmasq, serve different ip addresses based on interface used
body: <p>Basically my situation is that I'm running a VM for developing web sites.</p>
  
  <p>The host machine has its dns pointing at the VM which, is running dnsmasq, which resolves the addresses of various dev sites; i.e. test.mysite.vm, etc.</p>
  
  <p>The issue is, when I go from my work network to my home network, it all breaks because the IP of the VM changes. Is it possible to serve different IP addresses based on which interface the request came from? Or should I be trying to tackle this in a completely different way?</p>
  
  <p>Thanks for your help!</p>
  
  <hr>
  
  <p><strong><em>Turns out there was a much easier approach to this after all...</em></strong></p>
  
  <p>I now set up 2 interfaces on the VM, and don't need to use dnsmasq.</p>
  
  <p>The first is just a bridged/shared interface which allows the VM to use whatever internet connection is available to the host, with a restart of the network each time I move office.</p>
  
  <p>The 2nd is a private connection to my VM host, which has a static IP address. This is the interface I use to connect and bind any services such as nginx, mysql, etc.</p>