DNS resolver capable of CNAMEs to hosts?



  • 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



  • 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


  • LAYER 8 Global Moderator

    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???



  • 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!


  • LAYER 8 Global Moderator

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


Log in to reply