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

    Unbound not using IPv6 DNS upstream servers

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 3 Posters 896 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.
    • T
      thebear
      last edited by thebear

      Hi

      I enabled logging for Unbound and I noticed that Unbound is not using the IPv6 DNS servers. Based on the logs it shows only IPv4 is addressed while there are also 2 IPv6 servers enabled.

      When doing a packet capture on the WAN (PPPoE + DHCPv6) it shows up that the Unbound log is correct, none IPv6 dns request is made.

      31898668-e240-443d-8cb4-7c2668eb1d92-image.png

      233de58a-a8e8-46b4-9e7a-e8cf4851cd2c-image.png

      Unbound config:
      c8740800-281d-4547-b7ea-8bd74f1be2cc-image.png

      DNS upstream
      f009609a-92ac-4404-a7f5-bed9a063c640-image.png
      It might be relevant that I'm unable to get an WAN IPv6, its only receiving DHCPv6-PD prefixes for the LAN, IPv6 is working fine from the LAN. Could it be related that pfSense itself needs a WAN IPv6 address?

      [23.05.1-RELEASE][admin@pfSense]/root: dig google.com @2a02:a47f:e000::53

      ; <<>> DiG 9.18.13 <<>> google.com @2a02:a47f:e000::53
      ;; global options: +cmd
      ;; Got answer:
      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45470
      ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
      
      ;; OPT PSEUDOSECTION:
      ; EDNS: version: 0, flags:; udp: 512
      ;; QUESTION SECTION:
      ;google.com.			IN	A
      
      ;; ANSWER SECTION:
      google.com.		62	IN	A	142.251.39.110
      
      ;; Query time: 5 msec
      ;; SERVER: 2a02:a47f:e000::53#53(2a02:a47f:e000::53) (UDP)
      ;; WHEN: Fri Sep 01 22:10:33 CEST 2023
      ;; MSG SIZE  rcvd: 55
      
      [23.05.1-RELEASE][admin@pfSense]/root: ping 2a02:a47f:e000::53
      PING6(56=40+8+8 bytes) 2a02:a469:<cut>::1 --> 2a02:a47f:e000::53
      16 bytes from 2a02:a47f:e000::53, icmp_seq=0 hlim=62 time=3.724 ms
      16 bytes from 2a02:a47f:e000::53, icmp_seq=1 hlim=62 time=3.191 ms
      

      Could anyone shine a light on this behaviour?

      T GertjanG johnpozJ 3 Replies Last reply Reply Quote 0
      • T
        thebear @thebear
        last edited by thebear

        a7d630e5-89b0-450d-a6e9-d12faed27eb3-image.png

        Might be more relevant, Unbound is only addressing IPv4 from the running process.

        While doing a test from the pfSense GUI it works fine.
        09b9fd51-4394-4a7b-88c4-27f42214619c-image.png

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

          @thebear said in Unbound not using IPv6 DNS upstream servers:

          PING6(56=40+8+8 bytes) 2a02:a469:dead:beaf::1 --> 2a02:a47f:e000::53

          So you have a WAN IPv6 : 2a02:a469:dead:beaf::1 ?

          Yo should be able to see it here :

          f413e8c3-a005-45ea-bc03-2319d6618181-image.png

          and here :

          bb32555b-4b1e-4146-88f2-21987fa10745-image.png

          You have checked the first box here ?

          6ccec5b3-36dc-40a2-a975-dcc0efaf29a0-image.png

          ?

          You could set the log level of unbound to level 3.
          It's on the Services > DNS Resolver > Advanced Settings - at the bottom.
          Don't forget to set it back to 1, as unbound will log "a lot", so the log file will become very big.

          This :
          @thebear said in Unbound not using IPv6 DNS upstream servers:

          It might be relevant that I'm unable to get an WAN IPv6,

          does not match with :

          @thebear said in Unbound not using IPv6 DNS upstream servers:

          [23.05.1-RELEASE][admin@pfSense.high.local]/root: dig google.com @2a02:a47f:e000::53

          where you ask dig to use 2a02:a47f:e000::53, clearly a IPv6, to resolve "google.com" (for a A == IPv4 record)
          You got the answer !
          To reach 2a02:a47f:e000::53 you need to have a working IPv6 == a WAN IPv6. so IPv6 can get routed out.

          @thebear said in Unbound not using IPv6 DNS upstream servers:

          Could it be related that pfSense itself needs a WAN IPv6 address?

          You saw my images : there are two types of IPv6 addresses : the one starting with a "2" and the one starting with a "f".
          For me, the "f" one is valid locally, between my pfSense WAN and the upstream ISP router.
          I've also a "2" (GUA) on my WAN.

          5f3d4caa-413d-423b-90d6-082fae1ffe09-image.png

          [23.05.1-RELEASE][admin@pfSense.bhf.net]/root: dig @2001:4860:4860::8888 google.com AAAA +short
          2a00:1450:4007:813::200e
          [23.05.1-RELEASE][admin@pfSense.bhf.net]/root: ping 2001:4860:4860::8888
          PING6(56=40+8+8 bytes) 2a01:cb19:907:a600:92ec:77ff:fe29:392a --> 2001:4860:4860::8888
          16 bytes from 2001:4860:4860::8888, icmp_seq=0 hlim=116 time=18.599 ms
          16 bytes from 2001:4860:4860::8888, icmp_seq=1 hlim=116 time=18.644 ms
          16 bytes from 2001:4860:4860::8888, icmp_seq=2 hlim=116 time=17.437 ms
          ^C
          --- 2001:4860:4860::8888 ping6 statistics ---
          3 packets transmitted, 3 packets received, 0.0% packet loss
          round-trip min/avg/max/std-dev = 17.437/18.227/18.644/0.559 ms
          

          Note : 2001:4860:4860::8888 is Google's IPv6 free DNS .
          I asked for the AAAA or IPv6 of google.om. The anbswer was : "sure, it's 2a00:1450:4007:813::200e"

          So

          Unbound not using IPv6 DNS upstream servers

          Tell us more, and I'll tell you ^^
          pfSense, all processes like unbound etc, out of the box, will prefer IPv6 if it is available.

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

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

            @thebear said in Unbound not using IPv6 DNS upstream servers:

            Could it be related that pfSense itself needs a WAN IPv6

            Possible, if all you have on your wan is link-local.. And no GUA, it could be that unbound doesn't think it has a valid IPv6 address to use? That is just an off the cuff theory, I have never looked into it too much, I personally set unbound NOT to use IPv6.. with do-ipv6: no

            Other than a curiosity, not sure why it should matter - you can clearly look up AAAA via just IPv4.. So what does it really matter what transport is used to resolve something - as long as it gets resolved.

            I would be happy to do some testing of this.. But my HE tunnel gives me a gua address, I not sure I could set it not to and only use link-local?

            In your unbound setup, what do you have it set to use for outbound interfaces? The default all?

            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
            • T
              thebear @Gertjan
              last edited by

              @Gertjan thanks well as stated my ISP KPN (I think we live in the same country) does not provide a WAN IPv6 address, only a link-local address in the gateway overview (FE80) and over that link to the POP/Core the DHCPv6-PD prefixes are requested for my LAN interfaces. The 99:1 link is a test link, just to give pfSense a physical static IPv6 address, and it shows up that this test interface is selected for local sourced IPv6 traffic from the pfSense/FreeBSD kernel.

              @johnpoz indeed no GUA so I think Unbound doesn't see this link as a valid IPv6 exit point. Which might be causing the behavior we see. I prefer to have IPv6 native, IPv4 is nice to have ;-)

              I'll post my gateway screenshot when having access to the box tonight.

              johnpozJ GertjanG 2 Replies Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator @thebear
                last edited by

                @thebear said in Unbound not using IPv6 DNS upstream servers:

                I prefer to have IPv6 native

                Sure yeah that would be better than HE tunnel sure in the big picture.. I wasn't suggesting you move to tunnel vs native.. But to be honest, other than play I have found zero reason to actually have IPv6.. Yeah its the future and all, and yeah my phone with 8 other billion phones on the planet needs IPv6.

                My isp doesn't provide it, I have zero actual need for IPv6.. Can you name even just 1 resource you would not be able to access if you didn't have IPv6? I have been asking for years and years and have yet to have 1 person name even 1 thing that actually required IPv6 to access..

                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

                T 1 Reply Last reply Reply Quote 0
                • T
                  thebear @johnpoz
                  last edited by

                  @johnpoz Indeed no need for IPv6 and thats why there might be more chance a bug is in place, les testers ;-)

                  The box is able to ping to ipv6.google.com showed from the first post's selecting a random LAN port where DHCPv6-PD has assigned an address too.

                  2618ff4d-518b-4e2e-857f-ebabe61ca5ab-image.png

                  Gateway indeed only showing a link-local address. No IPv6 address on the WAN side.

                  a1e1b51b-953d-45a8-a486-545fec5d5dbd-image.png

                  Changed to:
                  a5df5a79-ca59-4fef-a92b-3d9a89b8249b-image.png

                  After the change of the outgoing interface to ALL it seems to started working. Thanks @johnpoz appreciated your tip.

                  510a0a53-4586-48b6-8eb8-262eaf3f3ba5-image.png

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

                    @thebear said in Unbound not using IPv6 DNS upstream servers:

                    ISP KPN (I think we live in the same country)

                    No KPN where I live.
                    I moved in the eighties to France.
                    Its called Orange here.

                    I've edited my post to put in some beef.

                    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 1
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.