# How to identify clients when using DNS-over-HTTPS (thru doh-proxy)

**URL:** <https://discourse.pi-hole.net/t/how-to-identify-clients-when-using-dns-over-https-thru-doh-proxy/72301>\
**Category:** General\
**Created:** [September 8, 2024, 9:50pm UTC](https://discourse.pi-hole.net/t/how-to-identify-clients-when-using-dns-over-https-thru-doh-proxy/72301 "2024-09-08T21:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SpottyMatt](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/spottymatt/32/43212_2.png) [@SpottyMatt](https://discourse.pi-hole.net/u/SpottyMatt)\
**Post date:** [September 9, 2024, 12:22am UTC](https://discourse.pi-hole.net/t/how-to-identify-clients-when-using-dns-over-https-thru-doh-proxy/72301/2 "2024-09-09T00:22:25Z")

</div>

I did at least manage to get DoH traffic clearly identified, though DoH clients are still all combined:

1. Start the DoH Proxy on a unique IP; `127.0.1.2`:  
`/etc/systemd/system/doh-proxy.service`

2. Local DNS entry for the name in `/etc/hosts`:

3. Modify lighttpd conf for the proxy to use that new IP:

Now, DoH queries don't show up as `localhost` but as `doh-proxy.hole`.

The thinking was that if I could do this on-demand, in software, for every client coming in to DoH, that I'd be able to classify requests properly.  
Connection -\> read client hostname -\> create /etc/hosts entry -\> spin up new doh-proxy process configured for that client name -\> some sort of teardown/cleanup logic for unused ones

It looks like the theory's sound, but it would require nontrival logic to be written somewhere.

And, for some reason FIREFOX connections immediately die with "cannot look up DNS" when attempting to connect; once unbound has finished finding the answer, you can refresh and it works.  
Brave/Chrome work normally. I suspect this means that, after adding this new IP and name, the DoH pipeline returns immediately with no answer if unbound doesn't have an answer, rather than waiting.  
I have not been able to find any logs to shed light on the situation.

For now, my DoH setup is still not really viable... I still need a feasible, reliable way to identify requesting clients.

---

_[View the full topic](https://discourse.pi-hole.net/t/how-to-identify-clients-when-using-dns-over-https-thru-doh-proxy/72301)._
