Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Domain to ip route
« previous
next »
Print
Pages: [
1
]
Author
Topic: Domain to ip route (Read 1583 times)
AxAn
Newbie
Posts: 12
Karma: 0
Domain to ip route
«
on:
October 13, 2021, 06:01:47 pm »
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?
Logged
KHE
Full Member
Posts: 229
Karma: 18
Re: Domain to ip route
«
Reply #1 on:
October 13, 2021, 09:03:22 pm »
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
«
Last Edit: October 13, 2021, 09:05:50 pm by KHE
»
Logged
AxAn
Newbie
Posts: 12
Karma: 0
Re: Domain to ip route
«
Reply #2 on:
October 14, 2021, 03:17:23 pm »
Thank you for the excellent info, that worked nicely.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Domain to ip route