I've read a few other posts with this issue, but I can't get it working.. posting new as the other posts were pretty old.
I've created an alias for a local server: host1alias
It's an alias for: host1.mylocaldomain.com (I've also tried just "host1")
I'm able to ping this host via the hostname, or the hostname + domain from every other host on my lan. eg, can ping, "host1" or "host1.mylocaldomain.com" from every pc on my lan, including from the OPNsense shell.
I use Unbound on OPNsense, with Pihole downstream up-stream handling all lan DNS querries, then forwarding them down-stream to Unbound running on my OPNsense node. This all works great.
But.. for some reason when I use the alias mentioned above in a Firewall rule, the traffic is blocked. I setup a port forward for port 1234 on my WAN address, to forward to port 1234 on "host1alias" - does not work.
When I change the alias to use the IP address, everything works fine. Others have this working.. hoping for some insight. Thanks.