title: How to configure DNSmasq to resolve an address always giving the current public ip on a specific network
body: <p>I have an http server (Apache) configured and running on a machine in my LAN. I want a website running on it to be accessible from all the computers connected to the LAN through a specific URL (e.g. www.mywebsite.mylan).</p>
  
  <p>I'm using DNSmasq as dns server (but I'm totally new to it). The server machine runs Os X 10.9.</p>
  
  <p>I saw that in order to have it resolve a specific address, a line like the following is needed in DNSmasq configuration:</p>
  
  <pre><code>address=/www.mywebsite.mylan/127.0.0.1
  </code></pre>
  
  <p>I want to know if it is possible to have something as the following:</p>
  
  <pre><code>address=/www.mywebsite.mylan/self_en0
  </code></pre>
  
  <p>to resolve the url using the local machine's public ip on a specific network (<code>en0</code>), since the dns server and the http server are running on the same machine and the ip address is dynamically assigned by the DHCP server of the router.</p>
  
  <p>Is there a viable way to get it or the only way to have it work is to use a static ip for the server machine?</p>