# DHCP Dynamic DNS update to pihole

**URL:** <https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515>\
**Category:** Help\
**Created:** [June 16, 2020, 11:20am UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515 "2020-06-16T11:20:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaya](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/y/cdc98d/32.png) [@yaya](https://discourse.pi-hole.net/u/yaya)\
**Post date:** [June 16, 2020, 11:20am UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515/1 "2020-06-16T11:20:16Z")

</div>

Hi there,

there was a help request for pihole 4.x:

> [@How to enable dynamic DNS updates from DHCP?](https://discourse.pi-hole.net/t/how-to-enable-dynamic-dns-updates-from-dhcp/22825):
>
> I've just installed Pihole and playing around and trying to find out how to configure dynamic DNS from DHCP. So when a client gets assigned a IP address via DHCP, then DNS will automatically be updated. Pi-hole Version v4.3.1 Web Interface Version v4.3 FTL Version v4.3.1 I've got this running on a different Pi with isc-dhcp-server and bind, but am wondering how to get this working on PiHole. Don't see any guides on this, is it possible?

due to that topis ic closed, I want to "reopen" here - as I can see huge improvement in pihole 5, which should make life more easy;-)

## Expected Behaviour:

I am running a OPNsense Firewall with DHCP there. This is must (until pihole can multi-arch-pxe 😛)  
I activated dynamic dns updates to do registering DHCP-clients at DNS server.  
Put in the DNS domain name and the dns server.  
due to inside secured network, I do not have a password --\> therefore api key is empty (so i do not put in any other setting to dhcp-server)

I am expecting, that my dhcp-leases should registered in pihole.

## Actual Behaviour:

I am not really sure if this is working - need some assistance for checking/testing. Actually I am completely new to pihole, apprecciating any help 🙂

## Debug Token:

no debug now - will do later maybe

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [June 16, 2020, 2:23pm UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515/2 "2020-06-16T14:23:07Z")

</div>

> [@yaya](#):
>
> I am running a OPNsense Firewall with DHCP there. This is must (until pihole can multi-arch-pxe 😛)  
> I activated dynamic dns updates to do registering DHCP-clients at DNS server.  
> Put in the DNS domain name and the dns server.  
> due to inside secured network, I do not have a password --\> therefore api key is empty (so i do not put in any other setting to dhcp-server)
> 
> I am expecting, that my dhcp-leases should registered in pihole.

This seems primarily like an issue for your OPNsense's DHCP server:  
Only a DHCP server registers DHCP leases.  
As long as Pi-hole is not your DHCP server, it won't register any DHCP leases.

If you want to make Pi-hole aware of the hostnames that a client tries to register with its DHCP server during DHCP negotiation, it would entirely depend on your DHCP server honoring those requests.  
Certain DHCP servers may just discard this information (e.g. ISC) without additional configuration.

If your DHCP servers does honor client hostnames, it would again depend on how your DHCP server adds those entries into your local DNS. Most routers run their own DNS server, and hence a DHCP lease's hostname will get injected into that DNS server only.  
I wouldn't know if OPNsense may or may not allow you to configure this.  
This would be a question for OPNsense support.

Provided your DHCP server injects hostnames into its own DNS server, you could handle that through Pi-hole by  
a) using your OPNsense DNS server as Pi-hole's sole upstream server  
b) enabling _Conditional Fowarding_  
c) configuring _Custom DNS records_ for each of your devices

The latter would also be the only way to guarantee that you see exactly the name you want for a device on your network, as DNS allows to register multiple names for the same IP, and some devices may pick rather ugly random names for themselves (e.g. Android smartphones).

---

<div class="post-metadata">

**Author:** ![yaya](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/y/cdc98d/32.png) [@yaya](https://discourse.pi-hole.net/u/yaya)\
**Post date:** [June 16, 2020, 3:28pm UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515/3 "2020-06-16T15:28:05Z")

</div>

Hi,

thank you for your answer - i might was not very clear with my question.  
my DHCP Server is the Firewall and I can see dhcp leases are also rechable via dns - thats the default setup - this is working.

what i want to do is:  
There is a option to register leases on a different dns server (like in enterprise area - when dhcp and dns services are separated). I put in that option and just want to check in pihole, if the dhcp told to register.

I don't know pihole very well - thats the reason I'm asking for support here instead of hours of searching 🙂

I found a screenshot on the net about what I mean:

 ![](https://discourse.pi-hole.net/uploads/default/original/3X/b/6/b6e06ee95a0be5e9c4613db4b24510249f99c7b4.jpeg)

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [June 16, 2020, 7:53pm UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515/4 "2020-06-16T19:53:50Z")

</div>

The picture you tried to link fails to show for me.

But independent from this, I've already given you the options for making Pi-hole aware of local hostnames as controlled by another device if Pi-hole is not running as DHCP server.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [July 7, 2020, 7:53pm UTC](https://discourse.pi-hole.net/t/dhcp-dynamic-dns-update-to-pihole/34515/5 "2020-07-07T19:53:51Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
