Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DNS Host Override not working

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 3 Posters 967 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cryptos
      last edited by

      I have a host override for my internal nas:

      nas.domain.tld -> 172.16.1.4,172.16.1.5 (it has two interfaces)

      When I dig the host, I get back the correct answer: 172.16.1.4

      However, when I try to access the site, I land at a DNS rebinding warning for the router (router.domain.tld) GUI. Moreover, if I try to traceroute to nas.domain.tld, I get back the WAN IP address.

      This was all working until maybe three months ago. I've torn my hair out trying to find a combination of settings that works, but nothing fixes this. Hoping the community can help!

      GertjanG johnpozJ 2 Replies Last reply Reply Quote 0
      • GertjanG
        Gertjan @cryptos
        last edited by

        @cryptos said in DNS Host Override not working:

        if I try to traceroute to nas.domain.tld, I get back the WAN IP address.

        WAN IP = the pfSense WAN IP, right ?
        And that is correct, your "nas.domain.tld" should point to your pfSense WAN IP.

        You have also a NAT rule, that maps "any IP" (from WAN) using port x to the internal LAN IP, using port x, or some other port, using TCP.
        Right ?
        And this NAT rule created an firewall rule on the WAN interface.

        Visitors that connect from somewhere from the Internet will never use the pfSense DNS to reach your NAS.
        The local "host override" doesn't come into play here.

        @cryptos said in DNS Host Override not working:

        I land at a DNS rebinding warning for the router

        The router is pfSense ?

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        C 1 Reply Last reply Reply Quote 0
        • C
          cryptos @Gertjan
          last edited by

          @gertjan said in DNS Host Override not working:

          @cryptos said in DNS Host Override not working:

          if I try to traceroute to nas.domain.tld, I get back the WAN IP address.

          WAN IP = the pfSense WAN IP, right ?

          Correct.

          And that is correct, your "nas.domain.tld" should point to your pfSense WAN IP.

          Not from inside, if I understand the point of the host override function: it should point to the internal IP. nas.domain.TLS is not published to my external DNS servers.

          You have also a NAT rule, that maps "any IP" (from WAN) using port x to the internal LAN IP, using port x, or some other port, using TCP.
          Right ?

          No. The nas is not (and is not intended to be) exposed to the Internet. It’s internal-only.

          And this NAT rule created an firewall rule on the WAN interface.

          Visitors that connect from somewhere from the Internet will never use the pfSense DNS to reach your NAS.

          I’m aware. That isn’t the the use case here.

          The local "host override" doesn't come into play here.

          @cryptos said in DNS Host Override not working:

          I land at a DNS rebinding warning for the router

          The router is pfSense ?

          Yes.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @cryptos
            last edited by johnpoz

            @cryptos said in DNS Host Override not working:

            I land at a DNS rebinding warning for the router (router.domain.tld) GUI.

            Here is the thing... If you router is called router.domain.tld, and you put in a host override that points nas.domain.tld to your wan or lan IP of pfsense.. And you hit it on the port your gui is listening on - then yes you would get a rebind warning.

            Because to pfsense nas.domain.tld is not its name.. A host override for nas should point to the nas IP not pfsense IP.

            if you want to hit pfsense with an different name, then you could put those other names here

            alt.jpg

            Under advanced, admin access.

            But normally a host override is used for say public fqdn nas.public.tld to resolve that to the local IP vs the public IP (your wan). Now clients using your dns locally trying to go to nas.public.tld would go to say 192.168.1.100 (your nas) vs your wan IP 1.2.3.4 to just be nat reflected back to your nas..

            You can setup whatever fqdn you want to any IP you want in your host overrides - but if you hit a pfsense IP with nas.localdomain.tld and its name is really router or pfsense.localdomain.tld then that would be a rebind warning..

            If you want your clients to resolve nas.localdomain.tld to your nas IP, that should be say the 192.168.1.100 IP of the nas, not some pfsense IP.

            Here example some host overrides of mine.. If I ask unbound running on pfsense for nas.local.lan I get back the IP of the nas (192.168.9.10)

            hostover.jpg

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            C 1 Reply Last reply Reply Quote 0
            • C
              cryptos @johnpoz
              last edited by

              @johnpoz

              Apologies if I was unclear, but my nas override DOES NOT point to any of my pfSense box’s IPs. It points to the DHCP-reserved IP of the nas’s ethernet interface.

              Here’s the setup:

              router.domain.tld > 172.16.1.1

              Host Override:
              nas.domain.tld > 172.16.1.4

              I have verified that a DNS lookup against nas.domain.tld returns the correct IP address.

              However, when I type nas.domain.tld into a browser, I get the aforementioned rebinding notice from the pfSense box. This is the behavior I can’t explain.

              johnpozJ 1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator @cryptos
                last edited by johnpoz

                @cryptos well then there is no way you would hit pfsense IP to get that rebind warning - just not possible..

                This is the behavior I can’t explain.

                Your browser using doh maybe? And its resolving that fqdn to pfsense IP then..

                What does nas.domain.tld resolve to on the public internet? If that domain.tld is public, and you have a wildcard setup then it would point to your wan IP - and that would generate a rebind warning because as I stated nas.domain.tld is not pfsense actual name..

                Browsers love to say oh F you admin/user - I am going to use doh for your own good..

                If your browser was resolving to that 172.168.1.4 address, which isn't on pfsense then there would be no way for you to get a pfsense rebind warning.

                If your browser is firefox you should be able to go to
                about:networking#dns

                in your address bar and see what it shows for the fqdn in its cache.

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                C 1 Reply Last reply Reply Quote 0
                • C
                  cryptos @johnpoz
                  last edited by

                  @johnpoz said in DNS Host Override not working:

                  @cryptos well then there is no way you would hit pfsense IP to get that rebind warning - just not possible..

                  This is the behavior I can’t explain.

                  Your browser using doh maybe? And its resolving that fqdn to pfsense IP then..

                  I thought of that, and tested it, but no: When I disable all of the DoT/DoH/ODoH options in Chrome, Firefox, and Safari, I still get the same result.

                  What does nas.domain.tld resolve to on the public internet? If that domain.tld is public, and you have a wildcard setup then it would point to your wan IP - and that would generate a rebind warning because as I stated nas.domain.tld is not pfsense actual name..

                  Good thought!

                  That should return NXDOMAIN, but doesn’t. I think this points to a different issue: I have what is supposed to be a single dynamic DNS entry: connect.domain.tld, which points to the pfSense WAN IP. Weirdly, my dyn provider showed an entry for nas.domain.tld which shouldn’t have existed. I’ve deleted it, and that seems to have cured the issue, for now.

                  Still doesn’t make sense, though, since the override should have returned the internal IP for internal queriers.

                  Will see if it comes back!

                  Thanks for your help!

                  Browsers love to say oh F you admin/user - I am going to use doh for your own good..

                  If your browser was resolving to that 172.168.1.4 address, which isn't on pfsense then there would be no way for you to get a pfsense rebind warning.

                  If your browser is firefox you should be able to go to
                  about:networking#dns

                  in your address bar and see what it shows for the fqdn in its cache.

                  johnpozJ 1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator @cryptos
                    last edited by johnpoz

                    @cryptos said in DNS Host Override not working:

                    Still doesn’t make sense, though, since the override should have returned the internal IP for internal queriers.

                    Yeah - and you showed it did with your direct query.

                    These browsers and their doh ticks me off to no end.. I don't think you can view what the browser shows as IP for fqdn in chrome, but firefox you can.. And it should list your doh settings on the top

                    example

                    trr.jpg

                    See my nas.local.lan - and what doh mode I am in, and if it came from TRR or not..

                    5 - Off by choice. This is the same as 0 but marks it as done by choice and not done by default.

                    You can never trust these guys these days... I have all known doh IPs blocked in pfsense as well.. If you couldn't tell, not a fan of doh ;)

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.