I have PfSense running currently with DNS and DHCP but I recently purchased a domain name and now I would like to have PfSense be a name server for a sub-domain but internal only. Currently host names resolve as expected as HOSTNAME/ in a browser and I would like to keep that and have them resolve as HOSTNAME.subdomain.domain.tld and have everything else forwarded out, which it does currently.
Yes, this is possible, but you need to install a new package. Go to System > Packages > Available Packages and download package
dns-server
orTinyDns
and it will be added to Services menu.In your use case you need to bind it to the LAN interface and use it also as a recursive DNS resolver for LAN, so that it serves both your local
subdomain.example.com
and does recursion to the rest. Then go to the New domain wizard and add domainsubdomain.example.com
.As you wanted to have
hostname.subdomain.example.com
for your whole internal network, you might be interested in the two options for registering DHCP mappings & leases with the DNS server.As you only use this locally you don't need to delegate control of the subdomain to your internal DNS server; it will believe it is the authoritative name server for this domain before it does any recursion.
The built-in DHCP/DNS had an option for a domain name.