I've got some different situations that rely on sending a sub-domain to a specific LAN ip.
I was using OpenWRT before and simply hardcoded it in /etc/hosts.
What is the correct/good way to do it in OPNsense?
For example would I like "test.example.com" to point to 192.168.0.100 and "test.example2.com" to point to 192.168.0.101
I don't want to use "example.com" or "example2.com" etc as my local domain.
I've been looking into Ubound DNS but I'm not sure what to use there or how to configure it.
I've also seen that you can add a domain for the DHCP4. Is that the way to go?
Hi,
with onbound it is quite simple. Go to Overrides in unbound and press the + button.
for test.example.com and 192.168.0.100 set:
Host: test
Domain: example.com
Type: A or AAAA (IPv4 or IPv6 address)
IP: 192.168.0.100
You can add a Description.
Repeat for the second entry. And you do not need to use example.com and example2.com as local domain.
A typical use-case is a server in your DMZ and you want to override the external IP for accessing them from inside your local network(s).
All assuming that unbound is already used.
KH
Thank you for the excellent info, that worked nicely.