Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCP DNS registration
« previous
next »
Print
Pages: [
1
]
Author
Topic: DHCP DNS registration (Read 2429 times)
javiers
Newbie
Posts: 4
Karma: 0
DHCP DNS registration
«
on:
October 19, 2023, 10:51:31 am »
Hi Team!
New to OPNSense and firewalls in general. Some previous experience with FortiNet but limited.
I have setup a Firewall at home behind the router:
I have set up OPNSense as DHCP server for the LAN part and DNS with Unbound DNS. So far everything is working fine. But I have a lot of temporary virtual machines on the proxmox server working on DHCP.
I wish to register these VMs name's automatically with their assigned DHCP address and name, but the information on internet and manuals is confusing, it almost always refers to Dynamic DNS for public IPs, not for internal DHCP leases.
Maybe there is some info/tutorial/video I can check to setup this?
Thanks!
Logged
Monviech (Cedrik)
Global Moderator
Hero Member
Posts: 1601
Karma: 176
Re: DHCP DNS registration
«
Reply #1 on:
October 19, 2023, 11:11:12 am »
For this to work your DNS structure should be:
- All hosts (except Raspberry Pi) use Unbound OPNsense as DNS Server
- Query Forwarding from OPNsense Unbound to your Raspberry Pi
- Raspberry Pi has the root DNS hints and does the recursive DNS lookups into the internet.
(I use this combination too, with pihole+unbound on a Raspberry Pi)
Then in Unbound on the OPNsense to to "Services: Unbound DNS: General" and activate:
DHCP Registration - Register DHCP leases
DHCP Static Mappings - Register DHCP static mappings
After that it should work as you want.
You can test easily if your leases are registered by going into the shell and doing:
Code:
[Select]
cat /var/unbound/dhcpleases.conf
«
Last Edit: October 19, 2023, 11:23:54 am by Monviech
»
Logged
Hardware:
DEC740
javiers
Newbie
Posts: 4
Karma: 0
Re: DHCP DNS registration
«
Reply #2 on:
October 19, 2023, 12:32:35 pm »
Hi Monviech!
Worked perfectly fine.
I just had to set up query forwarding to the Pi (it was not configured but I assume OPNSense was using it as DNS server as it was configured that way on OPNSense) and added
DHCP Domain Override
to my internal domain.
Thanks!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCP DNS registration