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

Unbound wont resolve domains using localhost

Scheduled Pinned Locked Moved DHCP and DNS
7 Posts 3 Posters 744 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.
  • H
    haberdabers
    last edited by Dec 3, 2020, 7:39 PM

    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
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Dec 3, 2020, 8:13 PM

      @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.8, 24.11

      1 Reply Last reply Reply Quote 0
      • H
        haberdabers
        last edited by Dec 3, 2020, 8:24 PM

        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. 😊

        G 1 Reply Last reply Dec 4, 2020, 12:29 PM Reply Quote 0
        • G
          Gertjan @haberdabers
          last edited by Gertjan Dec 4, 2020, 12:30 PM Dec 4, 2020, 12:29 PM

          @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 ??

          J 1 Reply Last reply Dec 4, 2020, 12:41 PM Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator @Gertjan
            last edited by Dec 4, 2020, 12:41 PM

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

            1 Reply Last reply Reply Quote 0
            • H
              haberdabers
              last edited by Dec 4, 2020, 1:44 PM

              It was a placeholder 😆 . Amazed someone had registered it.

              G 1 Reply Last reply Dec 4, 2020, 3:02 PM Reply Quote 0
              • G
                Gertjan @haberdabers
                last edited by Dec 4, 2020, 3:02 PM

                @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
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received