Hi,
I'm in the process of migrating from Technitium DNS to OPNsense and one thing I'm struggling with is creating an APEX record.
I have a number of sub domains going to various location, for example:
apps.domain.com --> 192.168.101.1
wp.domain.com --> 192.168.100.2
www.domain.com --> 192.168.100.3
domain.com --> www.domain.com <--- this is the problem.
How do I get DNS for domain.com (the APEX record) to point to either www.domain.com or 192.168.100.3?
With Technitium and other common DNS servers you can use "@" or the IP address.
However, this does not seem to be an option for OPNsense. How do I achieve that?
Thanks,
Richie
(at least as I understand it) DNS support in OPNsense is really meant to be used a resolver, not an authoritative server. It can provide some authoritative functions, but only simple ones - enough to make hosts on the local LAN accessible by name, and local IP addresses reverse-resolve, but not much more than that.
You should be able to add a host override with your domain name, and the hostname name blank, which should resolve in an A record. If you really need it to be a CNAME, I think you'd have to use something other than Unbound.
Quote from: dseven on February 27, 2025, 02:51:15 PMDNS support in OPNsense is really meant to be used a resolver, not an authoritative server.
There is a BIND plugin.
Quote from: dseven on February 27, 2025, 02:51:15 PMIf you really need it to be a CNAME, I think you'd have to use something other than Unbound.
You cannot have a CNAME for '@'. Since you need at least SOA and NS for any zone, inserting a CNAME for '@' would invalidate the zone file. "CNAME and other data" is forbidden by the standard.