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

    DNS Resolver

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    186 Posts 44 Posters 142.8k 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.
    • Q
      q54e3w
      last edited by

      Couple of small issues I spotted it tuning up my Resolver in build dated December 28th.

      In Resolver>General Settings>Advanced, parameters which include double quotes require a space on the end of each line to enforce the carriage return, i.e

      local-data: "example1.com A 10.10.10.1"
      local-data: "example2.com A 10.10.10.1"
      local-data: "example3.com A 10.10.10.1"
      
      

      Save & Apply, migrate away and back to the General settings page and you will see they have been reduced to one line.

      Also, not sure if this is a real issue, on advance settings page, when increasing the Message Cache Size, the associated RRset cache size isn't set correctly in the unbound.con file - not quite sure if its being internally handled correctly though.

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        I believe the double quotes carriage returns business has been fixed in later snapshots. Dec 28th was last year ;)

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • Q
          q54e3w
          last edited by

          thx for the info Phil, I'll upgrade as soon as get a clear moment.

          1 Reply Last reply Reply Quote 0
          • W
            wagonza
            last edited by

            @raab:

            dnssec was disabled

            Does the option under DNS resolver "Enable forwarding mode" not do the same thing as dnsmasq?

            Yes it does, Unbound then forwards all queries to the addresses defined and lets that server handle the recursion. However the other factors to consider are, for example, how the cache is tuned, prefetching enabled and other settings which are different or don't exist in dnsmasq.

            Thanks for the tests though I should attempt the same and see what I can come up with.

            Follow me on twitter http://twitter.com/wagonza
            http://www.thepackethub.co.za

            1 Reply Last reply Reply Quote 0
            • R
              raab
              last edited by

              Good to know, just want to make it clear that I'm not knocking unbound at all.

              I just wanted to see if there was any difference, granted I've done no tuning of unbound yet

              1 Reply Last reply Reply Quote 0
              • Q
                q54e3w
                last edited by

                Hi guys, Unbound has been working really well for me. I've been using unbound to filter some web sites using the advanced options of unbound which works really well. It it possible to apply these filters to only a subset of all my available subnets? For example, I'd like my VPN and wifi subnets to scrub adverts and tracking but for my 'clearnet' LAN subnet to ignore these filters.

                For example, i have redirects for Adverts configured as so….

                local-data: "www.google-analytics.com A 10.10.10.1"
                local-data: "click01.aditic.net A 10.10.10.1"

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

                  How are you getting these to work.. No matter what I try putting in the advanced section of the resolver, it won't start if anything is in there.

                  So for test I put exactly what you put in
                  local-data: "click01.aditic.net A 10.10.10.1"

                  But unbound will not start if I put that in the advanced section.

                  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
                  • D
                    doktornotor Banned
                    last edited by

                    server:
                    local-data: "click01.aditic.net A 10.10.10.1"
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      that works!  Thanks - is that documented somewhere?  I can add this to docs for the resolver advanced stuff.  This will answer the questions about how to easy load in stuff vs using the gui when you have lots of host over rides as well.

                      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
                      • D
                        doktornotor Banned
                        last edited by

                        @johnpoz:

                        Thanks - is that documented somewhere?

                        Not that I'm aware of.

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

                          Well I added a bit of info to https://doc.pfsense.org/index.php/Unbound_DNS_Resolver about it.  If I can find more info on the reason for that will be happy to update the wiki.

                          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
                          • D
                            doktornotor Banned
                            last edited by

                            @johnpoz:

                            If I can find more info on the reason for that

                            https://www.unbound.net/documentation/unbound.conf.html

                            Afraid unless someone's willing to recode the pfSense code per the manpage to stick various advanced options to respective clauses as required, people will have to specify that themselves.

                            1 Reply Last reply Reply Quote 0
                            • D
                              dstroot
                              last edited by

                              Wow - I have been putting things in "advanced" and anything in there caused unbound to not come up.  I just thought there was something wrong with what I was doing.  Just tried adding 'server:" and it worked!!

                              1 Reply Last reply Reply Quote 0
                              • D
                                doktornotor Banned
                                last edited by

                                I think this should be presented as a bold red hint in the GUI. Not just the wiki. Apparently people have no idea how's this supposed to work. Worth a bug IMO.

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

                                  I've found that I had to use the "server:" by accident. I'm using this to block dns from ads and spyware. Just make a file and put it at /conf folder to survive updates. Then, use this syntax:

                                  server:
                                  include: /conf/local-blocking-data.conf
                                  include: ………
                                  ….

                                  and it works. Free ad internet.

                                  the file itself is in this format:

                                  local-data: "000freexxx.com A 0.0.0.0"
                                  local-data: "004.frnl.de A 0.0.0.0"
                                  local-data: "01sexe.com A 0.0.0.0"
                                  local-data: "01viral.com A 0.0.0.0"
                                  local-data: "039068a.dialer-select.com A 0.0.0.0"
                                  local-data: "0427d7.se A 0.0.0.0"
                                  local-data: "0702.de A 0.0.0.0"
                                  ……

                                  I use a script to generate it from varius sources like http://pgl.yoyo.org/adservers/ or https://github.com/jodrell/unbound-block-hosts.

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

                                    But there seems to be something wrong. If I use advanced options, I can't use "Register DHCP leases in the DNS Resolver" enabled. Although it works fine.

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

                                      Yeah I see this

                                      Below is a minimal config file. The  source  distribution  contains  an
                                            extensive example.conf file with all the options.

                                      # unbound.conf(5) config file for unbound(8).
                                            server:
                                                  directory: "/etc/unbound"

                                      But I assume the stuff in this box is for the server, so didn't think would have to add that, etc.  Be nice to be able to use the include: directive as well to load a specific file with say host over rides in it, etc.  But can not seem to be able to figure out how to get include: to work using this advanced box?

                                      from your unbound doc link

                                      Files  can be included using the include: directive. It can appear any-
                                            where, it accepts a single file name as argument.  Processing continues
                                            as  if  the text from the included file was copied into the config file
                                            at that point.

                                      If that would work - that would be pretty slick ;)

                                      the only notes on the advanced box are
                                      "Enter any additional configuration parameters to add to the DNS Resolver configuration here, separated by a newline"

                                      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
                                      • D
                                        doktornotor Banned
                                        last edited by

                                        include: works, already used by default

                                        
                                        $ grep include: /var/unbound/unbound.conf
                                        include: /var/unbound/access_lists.conf
                                        include: /var/unbound/host_entries.conf
                                        include: /var/unbound/dhcpleases_entries.conf
                                        include: /var/unbound/domainoverrides.conf
                                        include: /var/unbound/remotecontrol.conf
                                        
                                        

                                        Though, the issue is… if you create something there outside of pfS awareness, the files will vanish sooner or later, at least on nanobsd.

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

                                          I think I've answered both of you in my previous post. I think we're talking about the same.

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

                                            Oh so you need to have .conf on the end of it?

                                            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.