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

    DNS AXFR of reservations?

    Scheduled Pinned Locked Moved DHCP and DNS
    3 Posts 2 Posters 779 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.
    • J
      jg3
      last edited by

      Hi,

      I have a bunch of DHCP resrvations with hostnames and they all resolve correctly.  Is there a way I can pull a list of all of them?  I mean, they're not really a zone (are they?) but I'm thinking along the lines of "dig -axfr localdomain @pfsense" … thoughts on how to do this?

      This .. kinda works?

      for a in {001..254}; do ans="`dig -x 10.1.1.$a @10.1.1.254 +short +norecurse`"; if [ $ans ]; then echo "10.1.1.$a    $ans"; unset ans; unset a; fi; done
      

      (where 10.1.1.0/24 is my network and 10.1.1.1 is my pfsense)

      … but man, that's just ugly.

      1 Reply Last reply Reply Quote 0
      • K
        kpa
        last edited by

        You need BIND, PowerDNS, NSD or something equivalent that supports zone transfers, the dnsmasq and unbound forwarders/resolvers do not have that capability.

        1 Reply Last reply Reply Quote 0
        • J
          jg3
          last edited by

          Thanks for the reply.

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