Client IP address in query log

Hi,

I have just started using pi-hole and I'm loving it. :slight_smile:

I configured it in my router and it works fine. When I check the client IP address in the queries list, it only shows my router's ip.

Is there any change to configure it to show the actual client IP where the request comes from?

BR Johannes

On a router there are two different things to configure

  • WAN : The way your router connect to internet. You can put here your ISP DNS or Google DNS
    Why ? What's the point to filter ads for your router ?
  • DHCP : There you tell your own network client which IP they get and which DNS they must use

A lot of configurations have the DNS pointed to the Router as the resolver. It's easier to set up the clients to get their DHCP leases and just have them point to the resolver in the router and then that process uses the Pi-hole as it's upstream. You could send out the DNS with the DHCP lease, it's just a matter of choice. If you want to temporarily disable the Pi-hole, you just need to change the resolver process in the router and your set. It the clients all get the Pi-hole via the lease and you have a long lease, you would have to refresh on all the clients to update. (This will be a bit different now that the Pi-hole has the capability of an off/on toggle, but previously there was no other option.)

1 Like

Dear both,

thanks for your replys but I do not see how it relates to my question... Or do I miss the point? :slight_smile:

Johannes

Depending on how your router works, you might have two spots to put DNS servers at. You'll want put Pi-hole in the LAN one, not WAN. If it's still showing as your router, than you can use the Dnsmasq service on your Pi-hole to also control DHCP for your network.

I don't think that's the issue he's having.
By what he said I think he wants to know if in the future people will be able to see the client's IP address in query logs.

Which would you can. (I just checked)

Usually you see the correct client IPs in the query log. However, we see two different kinds of implementations of DHCP server in commonly used routers, that differ slightly in how they handle the DNS server

  1. After you set the Pi-hole as DNS server they tell all clients on the local network to use the Pi-hole as resolver. This is what you expect and here you see the correct client IPs in the query log.

  2. However, there are routers which have a different logic: Even though you tell to use the Pi-hole as DNS server in the very same way, they still tell all the clients to use the router as DNS server. The router redirects all the incoming requests to the Pi-hole. In this case, the Pi-hole only always sees the router as the origin of all DNS requests. Unfortunately, there is nothing we can do about that.

Well, there is something we can do: In the next release will have an option to set up the Pi-hole itself as authoritative DHCP server for your network (you will disable the DHCP server in your router). This Pi-hole DHCP server configured such that it tells the clients to use the Pi-hole as DNS server (like situation 1. mentioned above).

3 Likes

A post was split to a new topic: DNS configuration for ADB Crow AX VP4412?