<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 5/23/23 20:18, Sten Carlsen wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:E8F0743F-28DE-4CD6-A237-7A6B42A56961@s-carlsen.dk">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <br>
      <div><br>
        <blockquote type="cite">
          <div>On 23 May 2023, at 19.46, Kaya Saman
            <a class="moz-txt-link-rfc2396E" href="mailto:kayasaman@gmail.com"><kayasaman@gmail.com></a> wrote:</div>
          <br class="Apple-interchange-newline">
          <div>
            <meta http-equiv="Content-Type" content="text/html;
              charset=UTF-8">
            <div>
              <p><br>
              </p>
              <div class="moz-cite-prefix">On 5/23/23 18:07, Sten
                Carlsen wrote:<br>
              </div>
              <blockquote type="cite"
                cite="mid:84768971-DE72-495D-BB34-62286BE42BAC@s-carlsen.dk">
                <blockquote type="cite">
                  <pre class="moz-quote-pre" wrap="">On 23 May 2023, at 19.00, Kaya Saman <a class="moz-txt-link-rfc2396E" href="mailto:kayasaman@gmail.com" moz-do-not-send="true"><kayasaman@gmail.com></a> wrote:


</pre>
                  <blockquote type="cite">
                    <pre class="moz-quote-pre" wrap="">On 5/23/23 12:47, Matus UHLAR - fantomas wrote:
</pre>
                    <blockquote type="cite">
                      <pre class="moz-quote-pre" wrap="">On 23.05.23 12:22, Kaya Saman wrote:
I've got a very strange problem that has emerged somehow after migrating my isp.


My setup previously used 2x servers in master/slave configuration for my public "view" and then had 3x servers for the "internal" view. This was working fine for years and I have been regularly testing using online dns healthcheck sites such as mxtoolbox etc...


Now when I try to run any type of check from mxtoolbox or other site eg. <a class="moz-txt-link-freetext" href="https://dnschecker.org/" moz-do-not-send="true">https://dnschecker.org/</a> I am getting my private IP's showing instead of the public ones?


Initially it started off by my external zone files not transferring which I managed to see that the information was trying to traverse my NAT (I know, not the best practice to have all dns servers on the same network).


As a result external emails from my mail server are not working too well with a hit and miss type thing going on right now.


Just to go over, my zone files are fine as the 'external' ones only have public ip addresses in them and do not include any type of internal addressing whatsoever.


Here's an example of the config in named.conf for the master:
</pre>
                    </blockquote>
                    <blockquote type="cite">
                      <pre class="moz-quote-pre" wrap="">view "external" {
    match-clients { !internals; any; };
</pre>
                    </blockquote>
                    <pre class="moz-quote-pre" wrap="">[...]
</pre>
                    <blockquote type="cite">
                      <pre class="moz-quote-pre" wrap="">view "external" {
    match-clients { !internals; any; };
</pre>
                    </blockquote>
                    <pre class="moz-quote-pre" wrap="">I don't see your definition of "internals".
Also, I don't see your definition of internal view.
if internal IP addresses are visible on the internet, obviously the internet sources fall into your internal view, not into this one.


</pre>
                  </blockquote>
                  <pre class="moz-quote-pre" wrap="">Finally, I understand what is going on and things get stranger....


The internal IP addressing is being served up by the slave servers. They seem to have pulled the file domain.db and renamed it to domain-external.db???


Of course the 'master' machine is already serving up domain-external.db to the public domain. This has the correct IP addressing with everything else such as dkim and dmarc.


So, currently I think the whole problem is stemming from the fact that the zone transfers are not working correctly for my external view between 'master' and 'slave' servers.


How can I do that without needing to traverse my NAT?

</pre>
                </blockquote>
                <pre class="moz-quote-pre" wrap="">When migrating ISP, are you sure that there is not another NAT in the ISP router?
That would explain this. The internet would present itself as 192.168.xx.xx and match your internals.</pre>
              </blockquote>
              <p><br>
              </p>
              <p>I can certainly ask. Though I am on a business package
                with multiple static public IPv4 addresses. I think I
                have a /28 block if memory serves me well....</p>
              <p><br>
              </p>
            </div>
          </div>
        </blockquote>
        You might find that it has some kind of address translation
        built-in "to protect your business" or whatever. To me it still
        smells that way.</div>
      <div>You might look at the IP address for the port you think is
        the internet - if that has an 192.168.x.x. or 172.16.x.x. or
        10.x.x.x it would be clear that is what your problem is. It can
        still be solved but other setup details will be needed.</div>
    </blockquote>
    <p><br>
    </p>
    <p>I'm not sure what you mean by "port to the internet"?</p>
    <p><br>
    </p>
    <p>The actual DNS servers themselves don't have a public IP address.
      They are all running internal addressing and have been for many
      years, another words the address on the NIC itself is private.
      What I am doing is using NAT/PAT to translate the public address
      to the private address of the server itself.</p>
    <p><br>
    </p>
    <p>So essentially on my side I am doing int_dns -> ext_dns ->
      internet</p>
    <p>Reverse then becomes internet -> ext_dns (port 53 udp/tcp)
      -> int_dns (port 53 udp/tcp)</p>
    <p><br>
    </p>
    <p>That's how I am handling things. I wonder if that is the cause or
      if there is something that my ISP has in place? Hence the fact
      that I'm using "views" to differentiate between 'internal' and
      'external' addresses.</p>
    <p>Actually I did run a tcpdump on the server and my
      firewall/gateway both and the addresses coming in are both from
      public domain. No internal addressing hitting the server WAN side,
      even when my NAT/PAT translates my ext_ip to int_ip, the public
      address of say the mxtoolbox checker is still there.<br>
    </p>
    <p><br>
    </p>
    <p>I should know in a few days if there is anything my ISP is doing
      in the middle. But* I really am not sure if it is something that I
      am doing within the config, though I have posted pretty much all
      of my named.conf file up. Though it still doesn't explain how the
      IP addresses keep 'flapping' - especially in mxtoolbox using the
      DNS Check. Sometimes I see internal addresses and sometimes I see
      external addresses?? It just seems like random occurrence really
      unless I badly misconfigured something?<br>
    </p>
  </body>
</html>