<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Have you checked the contents of /etc/hosts file? Sometimes the
      local hostname is added there to save resolution of local hostname
      again and again. Could its record override address= you wanted to
      assign? I doubt there is defined and documented order if they
      conflict.</p>
    <p>Does you /etc/hosts contain:</p>
    <p>127.0.0.1 localhost xxx  ?</p>
    <p>it might help if you remove expand-hosts from dnsmasq
      configuration and use aliases in the file itself. But avoid
      conflicting definition with dnsmasq. Consider also using
      host-record, which will match only xxx.mydomain.com, not
      example.xxx.mydomain.com.</p>
    <p>Cheers,<br>
      Petr<br>
    </p>
    <div class="moz-cite-prefix">On 3/20/23 18:15, Paul Constantine
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:trinity-94d2fbdd-7af5-45de-a1b3-58a1a367341e-1679332509720@3c-app-webde-bs07">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div style="font-family: Verdana;font-size: 12.0px;">
        <div>So here is my DNSMASQ problem.</div>
        <div> </div>
        <div>I'm running to VirtualBox Ubuntu 16.04 servers on two
          seperate 2011 mac mini servers (macos High Sierra).</div>
        <div>Each of the two VirtualBox Ubuntu servers runs a LAMP
          website (Drupal based) and a DNSMASQ dns server. </div>
        <div>The network is controlled by a Fritz!Box 7590. In the
          configuration the two different DNSMASQ servers are listed
          instead of the standard provider DNS.</div>
        <div> </div>
        <div>VirtualBox One:</div>
        <div>    static IP     192.168.2.50<br>
              website IP     192.168.2.50    xxx.mydomain.com<br>
              DNSMASQ IP     192.168.2.50</div>
        <div> </div>
        <div>VirtualBox Two:</div>
        <div>    static IP     192.168.2.55<br>
              website IP     192.168.2.55    yyy.mydomain.com<br>
              DNSMASQ IP     192.168.2.55</div>
        <div> </div>
        <div>Fritz!Box (router)</div>
        <div>    Gateway        192.168.2.1<br>
              DHCP        192.168.2.100-200</div>
        <div> </div>
        <div>So far so good. This setup seemed to have worked for hals a
          year. Then recently I had to restore one of the VirtualBox
          servers. And now it only works somewhat. In short:</div>
        <div> </div>
        <div>Each of the two DNSMASQ servers will only resolve the
          website on the other VirtualBox, the website on the same
          VirtualBox will resolve to localhost.</div>
        <div> </div>
        <div>So if I want to be able to reach the domain in VirtualBox
          One I have to use the DNSMASQ server in VirtualBox Two and the
          other way around.</div>
        <div> </div>
        <div>Here is the dnsmasq.conf file from VirtalBox Two (for Box
          One just substitute the 192.168.2.50 for 192.168.2.55).</div>
        <div> </div>
        <div>cat /etc/dnsmasq.conf<br>
          ----------------------------------------------------<br>
          # DNS configuration<br>
          port=53</div>
        <div>#/etc/dnsmasq.conf<br>
          domain-needed<br>
          bogus-priv<br>
          expand-hosts<br>
           <br>
          # The address 192.168.2.55 is the static IP of this server <br>
          # You can find this ip by running ifconfig and look for the <br>
          # IP of the interface which is connected to the router.<br>
          listen-address=127.0.0.1<br>
          listen-address=192.168.2.55<br>
          bind-interfaces<br>
           <br>
          # Use open source DNS servers<br>
          server=8.8.8.8<br>
          server=8.8.4.4<br>
           <br>
          # Create custom 'domains'.<br>
          # Custom 'domains' can also be added in /etc/hosts</div>
        <div>address=/xxx.mydomain.com/192.168.2.50<br>
          address=/yyy.mydomain.com/192.168.2.55</div>
        <div># address=/www.anotherdomain.com/192.168.2.50<br>
          # address=/anotherdomain.com/192.168.2.50</div>
        <div># address=/www.stillanotherdomain.ch/192.168.2.50<br>
          # address=/stillanotherdomain.ch/192.168.2.50<br>
          ----------------------------------------------------</div>
        <div> </div>
        <div>I am not very experienced with DNS servers, so can you
          possible point me in the right direction if you see an error.</div>
        <div> </div>
        <div>Thanks<br>
          Paul</div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Petr Menšík
Software Engineer, RHEL
Red Hat, <a class="moz-txt-link-freetext" href="https://www.redhat.com/">https://www.redhat.com/</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
  </body>
</html>