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

    KEA DHCP error - Error 9502: Bad DNS packet.

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 3 Posters 119 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.
    • C
      cjbujold
      last edited by

      When doing a NSLookup on a client PC using pFSense as the DNS server, I keep getting the error:" Error 9502: Bad DNS packet". Using another DNS server (not PFsense) NsLookup from a client PC works perfectly. Using the PFsense diagnostic DNS lookup works perfectly. Tried over 10 different clients/servers with same failure results.

      How can I fix this issue, since it is affecting my KEA DHCP clients. I have to point them to an external DNS for them to work.

      Configuration:
      Using PFsense 24.11 (the 25.3 stable version is still not available for update in my update option. - current beta version 25.07).
      Unbound (DNS Resolver)
      DHCP (KEA)

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

        @cjbujold said in KEA DHCP error - Error 9502: Bad DNS packet.:

        I keep getting the error:" Error 9502: Bad DNS packet"

        What PC ? Windows ? Something else ?

        Where / how did this error show up ?

        What does (Windows) :

        ipconfig /all
        

        show you ?
        Or the command equivalent of your PC.

        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
        • C
          cjbujold
          last edited by

          1. All PC are running Windows 11 latest version with July updates

          2. Servers are Windows server 2019 and 2025 with July updates

          3. IPconfig /all using my PC running Windows 11 with July updates: 27cae5c3-8ae3-460e-9a3f-5da7143be532-image.png

          4. Using Windows NSLookup after clearing DNS cache and doing lookup on Google.com 230742ea-da1c-48aa-aa25-f6c4e523b409-image.png

          5. using DNSDataview with primary DNS server set to 192.168.76.1(Pfsense)
            e0a1201e-3044-4924-ba61-0901e195246a-image.png

          6 Using DNSdata with primary DNS server set to ISP DNS server 2f49320f-f48f-4855-9f6d-e3fefc8d1c04-image.png

          DNS resolver is using standard out of the box setup. Also using PFBlockerNG which added in the custom field " server:include: /var/unbound/pfb_dnsbl.*conf "

          Any help would be appreciated. Thanks

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

            @cjbujold query refused points to the ACLs not being correct to allow queries.

            Did you turn off automatic ACLs?

            query.jpg

            This would be under the unbound gui, advanced

            If you turn that off - then you have to create your own ACLs

            acls.jpg

            Other things I see wrong is all those other dns setup on your ethernet adapter.. Those outside NSers sure are not going to be able to resolve your local resources. If your going to point to more than 1 NS - the name servers you point to should resolve the same stuff. If they are filtering NSers then they should filter the same way. If NS A filtering is different than NS B - your going to run into issues because you never know which NS you might talk to.. So maybe something you want filtered is not, maybe something you want to resolve is filtered.. And none of those public are going to be able to resolve any local resources you want to resolve, etc.

            You see when you do that lookup and it says unknown for server - that tells me your NS is borked - when nslookup tries to talk to a NS it would always do a PTR for the IP.. If the NS your talking to can not even resolve the PTR of its own IP address - there is something wrong with it..

            $ nslookup
            Default Server:  sg4860.home.arpa
            Address:  192.168.9.253
            

            192.168.9.253 is my pfsense IP, and that is where client points to for dns - see how it returns name of my pfsense.

            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
            • C
              cjbujold
              last edited by

              Thank you that fixed my issue, much appreciated.

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

                @cjbujold

                Not related, but you have wired NIC and a wifi NIC, both using the same 192.168.76.0/24 network.
                Wired 168.168.76.223 - gateway 192.168.76.1 (probably pfSense LAN)
                Wireless : 192.168.76.50 - gateway 192.168.76.1 (probably pfSense LAN)
                and both have a bunch of 'strange', non local DNSes.

                Be ware that things can become confusing as a same device has more then one IP in the same network. I mean, its good for redundancy, true, but still ...

                Normally the DNS server for that PC would / should be 192.168.76.1 also.
                The ieda is that all your devices uses the same local 'pfSEnse' resolver - and if you have to use 47.55.55.55 etc as a DNS source, you could set the resolver to forward to that DNS (and the others).
                Now, you local network DNS requests are getting cached locally so your entire network can benefit from this.

                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

                  @Gertjan those 3 name server might be just his isp dns.. that first on is fibreop and the others are aliant - which are the same isp - with the fibre one being for their FTTH.

                  Yeah if you want to use those - you should have unbound forward to them - but I see little benefit to forwarding for dns, just let unbound resolve is better option imho.

                  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.