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

    Unbound wont resolve domains using localhost

    DHCP and DNS
    3
    7
    729
    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.
    • H
      haberdabers
      last edited by

      Hi,

      I have a client who has come across a weird problem I haven't seen before and I am not sure how to fix. A couple of domains they use resolve to 127.0.0.1 as the app is running locally on there computers. When I do a lookup for the domain i.e "loop.foo.com" pfsense doesnt resolve it (also tried locally within the webgui). When I try direct to google dns from my phone it works. I added a static entry in pfsense for the domain and it works as it should, so I have a temporary workaround.

      The set up is a single VM in ESXI running Unbound and pfblocker with openDNS as the external dns.

      Any ideas where the problem could be?

      tldr: If the domain resolves to 127.0.0.1 it fails when going through pfsense.

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

        @haberdabers said in Unbound wont resolve domains using localhost:

        If the domain resolves to 127.0.0.1 it fails when going through pfsense.

        Well that would be a rebind, so no unbound will not return that..

        You would need to disable rebind protection, or set that domain as private so it would not do rebind protection on it.

        https://docs.netgate.com/pfsense/en/latest/services/dns/rebinding.html

        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.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • H
          haberdabers
          last edited by

          Thanks Johnpoz. Just found the issue when you posted. I have entered the domain into the advanced options using "private-domain: foo.com" and all is good again.

          https://blog.jenningsga.com/pfsense-dns-resolver-and-private-domains/

          Thanks once again. ๐Ÿ˜Š

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @haberdabers
            last edited by Gertjan

            @haberdabers

            dig loop.foo.com A +short
            34.206.39.153
            

            That's not 127.0.0.1.

            Btw : I'm using default resolver settings.

            edit : Google agress with me :

            dig @8.8.8.8 loop.foo.com A +short
            34.206.39.153
            

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

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

              I take it his foo.com was just a placeholder, I don't think that was his actual domain ;)

              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.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • H
                haberdabers
                last edited by

                It was a placeholder ๐Ÿ˜† . Amazed someone had registered it.

                GertjanG 1 Reply Last reply Reply Quote 0
                • GertjanG
                  Gertjan @haberdabers
                  last edited by

                  @haberdabers said in Unbound wont resolve domains using localhost:

                  Amazed someone had registered it.

                  Your fault.
                  You mentioned it, they bought it quickly so you have to negotiate now ;)

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

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