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

    DNS resolver capable of CNAMEs to hosts?

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 3 Posters 3.9k 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.
    • N
      nickt
      last edited by

      Hi, I've found some related but different threads. I have a host which receives an IP address based on its MAC address via pfSense DHCP. I'd now like to setup a CNAME to that host in DNS, so that its webserver can vhost to the correct site. I see that I can use a Host Override to assign a new name to that IP, and add some aliased names (which I assume would become CNAMEs), but that seems to depend upon me setting the IP address in the Host Override. I'd prefer to not hardcode that IP address in both the DHCP and DNS services.

      Is it possible to just add a CNAME, without first having to override based on knowledge of the host's IP address?

      thanks

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

        You can't do that with Unbound directly, the CNAME won't resolve because Unbound is not an authoritative name server:

        https://www.bentasker.co.uk/documentation/linux/279-unbound-adding-custom-dns-records

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

          huh?

          If you have dhcp reservation already setup.. "I have a host which receives an IP address based on its MAC address"

          Why would you not want to not setup overrides for whatever names you want to point to that IP???

          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
          • N
            nickt
            last edited by

            The host is getting its primary name, but in this case, I want the host to have 3 separate DNS names, so that vhosts can be used to select between the various web services that machine hosts. I can easily hardcode a DNS override but I was hoping to be able to do that without having to make DNS hardcode the IP address. Thanks anyway!

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

              Well then run an authoritative name server if you want to use cnames.

              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.