How to get IPs/hostname from clients from different network(s)?

Does anyone has an idea, how to get/identify/resolve clients from different networks in pihole?

192.168.0.0/24  is my DMZ network for IoT and non-personal machines
192.168.42.0/24 is my client network behind DMZ network with personal machines/devices
192.168.0.13    is DNS for both networks which port-forwards to...
192.168.42.241  is running pihole which is reached by port forwarding 0.13:53 -> 42.241:53

Therefore all top-clients in private 192.168.42.0/24 network are 192.168.0.13 or 192.168.0.* (DMZ-machines, IoT, ...) but never the real 192.168.42.0.* clients in my client network :frowning:

Expected Behaviour:

192.168.42.* clients can be identified with their 42-IP and not the IP from 0.13-forwarding-IP.

Actual Behaviour:

192.168.42.* clients are identified as the IP 0.13 (my forwarding-IP).

1 Like

What do you use as router? You might be able to use EDNS(O)

In general, there might be not much chance with this setup, as all queries from the different subnets appear for pihole as if they would come from 0.13-forwarding-IP (which they are, from an IP view).

You might need to change your setup and assign IPs for each subnet to your Pi-hole device. Something like

Above guide configures IP's in /etc/network/interfaces that most likely will conflict with dhcpcd5 thats installed:

pi@ph5:~ $ journalctl -u dhcpcd
[..]
Jan 25 21:20:34 ph5 dhcpcd[7767]: eth0: using static address 10.0.0.4/24
Jan 25 21:20:34 ph5 dhcpcd[7767]: eth0: adding route to 10.0.0.0/24
Jan 25 21:20:34 ph5 dhcpcd[7767]: eth0: adding default route via 10.0.0.1
[..]

Below better to assign multiple IP's to a single interface:

1 Like

@yubiuser : My Router is a TP-Link AX6000.

It seems to me, that my setup is a little bit too "exotic":
Pihole is running in a Docker Container on my OpenSUSE Linux which is located in my private (42) network. I don't want to have it completely or another IP in my DMZ (0) network :frowning: :thinking:

Thanks! Was just a quick googling for multiple IPs per interface.

1 Like

I don't thing you can configure EDNS on that router.


The only other way I see then is: get a Pi-hole for each subnet.

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