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

    DNS Resolver domain override issue for just one client in the same network

    Scheduled Pinned Locked Moved DHCP and DNS
    20 Posts 2 Posters 1.5k 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.
    • K
      kevindd992002 @kevindd992002
      last edited by

      Here's some logs from 192.168.20.1:

      Oct 5 23:48:39 	unbound 	77902 	[77902:3] info: validator operate: query pfsense.home.arpa. A IN
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] debug: validator[module 0] operate: extstate:module_wait_module event:module_event_moddone
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] debug: return error response SERVFAIL
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] debug: configured stub or forward servers failed -- returning SERVFAIL
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] info: processQueryTargets: pfsense.home.arpa. A IN
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] info: error sending query to auth server 192.168.10.1 port 53
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] notice: remote address is 192.168.10.1 port 53
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] notice: sendto failed: Can't assign requested address
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] debug: sending to target: <home.arpa.> 192.168.10.1#53
      Oct 5 23:48:39 	unbound 	77902 	[77902:3] info: sending query: pfsense.home.arpa. A IN 
      
      K 1 Reply Last reply Reply Quote 0
      • K
        kevindd992002 @kevindd992002
        last edited by

        OH WAIT! It looks like even A is not working. A is pihole in this case and I forgot that I had configured pihole to forward requests directly to 192.168.10.1 for home.arpa, therefore bypassing the DNS resolver in pfsense. So at least now I know that the behavior is consistent for all 192.168.20.0/24 clients. The pfsense DNS resolver is definitely acting up at this point.

        K johnpozJ 2 Replies Last reply Reply Quote 0
        • K
          kevindd992002 @kevindd992002
          last edited by kevindd992002

          One important question here. When unbound queries a request for the domain override to the destination DNS server, what source IP does it use? localhost? Because I might need to re-enable this SNAT rule to fix this:

          da3960ca-70cc-4a55-9dbb-2771a6f78dcc-image.png

          K 1 Reply Last reply Reply Quote 0
          • K
            kevindd992002 @kevindd992002
            last edited by kevindd992002

            Ok, so re-enabling that SNAT rule on both sides and adding the WIREGUARD network to the DNS resolver access list on both sides fixed the problem.

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

              @kevindd992002 said in DNS Resolver domain override issue for just one client in the same network:

              behavior is consistent for all 192.168.20.0/24 clients.

              That makes more sense.. Well depends on what natting your doing or not doing.. And yes through any forward with an domain override you can run into 2 issues.

              if answer comesback as rfc1918 it would be considered a rebind - so you need to make sure the domain is set as private in the unbound doing the query.

              On the other end where your forwarding too, that unbound ACL would have to be setup to allow the query from this remote network.. Sure you could work around the ACL issue with a sourcenat on that site, but better would be is just update the ACL.

              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

              K 1 Reply Last reply Reply Quote 0
              • K
                kevindd992002 @johnpoz
                last edited by kevindd992002

                @johnpoz said in DNS Resolver domain override issue for just one client in the same network:

                @kevindd992002 said in DNS Resolver domain override issue for just one client in the same network:

                behavior is consistent for all 192.168.20.0/24 clients.

                That makes more sense.. Well depends on what natting your doing or not doing.. And yes through any forward with an domain override you can run into 2 issues.

                if answer comesback as rfc1918 it would be considered a rebind - so you need to make sure the domain is set as private in the unbound doing the query.

                On the other end where your forwarding too, that unbound ACL would have to be setup to allow the query from this remote network.. Sure you could work around the ACL issue with a sourcenat on that site, but better would be is just update the ACL.

                The answers are definitely RFC1918's but they're still not considered as rebind. Do you know why? Of course, I want rebind protection to work.

                And how do I set the domain to private in the unbound that's doing the query?

                For the unbound ACL where I'm forwarding to, if I update its ACL to allow the query from the unbound that's doing the query, what source IP will I put there if I don't do sourceNAT? If I don't do sourceNAT, I won't know what the source IP of the unbound from either side because IIRC the source for unbound requests is "This Firewall" and I'm not 100% sure what that is but that's the one in my SNAT rule now and it works.

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

                  @kevindd992002 said in DNS Resolver domain override issue for just one client in the same network:

                  RFC1918's but they're still not considered as rebind. Do you know why? Of course,

                  Did you set them as private in the unbound config? I guess there could be some config that says anything home.arpa the like could be non rebind, but I doubt that..

                  Did you turn off rebind completely?

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

                  edit
                  As to what IP.. With default outbound nat on, it would be the query unbound pfsense IP on the tunnel network you have setup for the s2s I would believe.. If you have messed with outbound nat from auto. It would have to be an IP that pfsense could use to talk to this other network with.. That would have to be the IP it has on the s2s connection. Or it would have to be natted to that IP, etc.

                  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

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    kevindd992002 @johnpoz
                    last edited by

                    @johnpoz said in DNS Resolver domain override issue for just one client in the same network:

                    @kevindd992002 said in DNS Resolver domain override issue for just one client in the same network:

                    RFC1918's but they're still not considered as rebind. Do you know why? Of course,

                    Did you set them as private in the unbound config? I guess there could be some config that says anything home.arpa the like could be non rebind, but I doubt that..

                    Did you turn off rebind completely?

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

                    edit
                    As to what IP.. With default outbound nat on, it would be the query unbound pfsense IP on the tunnel network you have setup for the s2s I would believe.. If you have messed with outbound nat from auto. It would have to be an IP that pfsense could use to talk to this other network with.. That would have to be the IP it has on the s2s connection. Or it would have to be natted to that IP, etc.

                    I did not:

                    7d0d39f8-daaa-44c8-960f-aa4480d1376a-image.png

                    4a850e4e-31b1-4c64-8c84-301cbaaff5c4-image.png

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

                      @kevindd992002 ha - they seemed to have changed it to help users doing local forwarding.

                      I just added a couple of test domain forwards for testing to a local ns.. And look what gets added to the conf ;)

                      overrides.jpg

                      I do not recall seeing this in the release notes? But there it is.. look in your

                      [21.05.1-RELEASE][admin@sg4860.local.lan]/: cat /var/unbound/unbound.conf
                      

                      conf.jpg

                      I wonder when that got added - I am pretty freaking sure it didn't use to do that..

                      edit: Well F me - looks like that was added sometime back in 2017 from looking through the github code for unbound.inc..

                      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

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        kevindd992002 @johnpoz
                        last edited by

                        @johnpoz said in DNS Resolver domain override issue for just one client in the same network:

                        @kevindd992002 ha - they seemed to have changed it to help users doing local forwarding.

                        I just added a couple of test domain forwards for testing to a local ns.. And look what gets added to the conf ;)

                        overrides.jpg

                        I do not recall seeing this in the release notes? But there it is.. look in your

                        [21.05.1-RELEASE][admin@sg4860.local.lan]/: cat /var/unbound/unbound.conf
                        

                        conf.jpg

                        I wonder when that got added - I am pretty freaking sure it didn't use to do that..

                        edit: Well F me - looks like that was added sometime back in 2017 from looking through the github code for unbound.inc..

                        Lol, that makes total sense th!en. Thanks for the help!

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