I want all DNS request from the devices under the downstream router (highlighted in light blue) to show as the actual IP requester in the primary router for all DNS request. Right now, DNS sees them as 192.168.10.1 which is correct by default but I want the actual IP of the devices under the downstream router to be logged/showed instead.
I know this has been answered before but I've been looking for a few hours but can't find it. I hope somebody can help me with this.
Have you configured your “downstream” OpenWRT router as a dumb AP? I recommend that setup over what you’re showing here. You can also likely fold VLAN segregation into the mix
No this is not what I'm aiming for. The downstream router is a sub-network (and it has it's own devices and mesh routers connected to it, and it actually has VLANs setup). And this is the design/setup i've been using for almost a year now and I don't plan on changing the network topology.
I just want to log the DNS queries from the sub-network with it's original IP's and in turn use statistics to monitor actual usage of each devices including devices in the sub-network.
I think the solution might be related to setting up DNAT and PREROUTING (or POSTROUTING). I can't still figure out how to make this work or even if it is possible to make it work.
This is one route I'm thinking of but as much as possible (hoping) not to remove masquerading.
Yes, see the actual SRC IP from the subnetwork 192.168.10.x that queries the DNS in 10.0.0.1. Is this even possible. I know i've read this somewhere before but can't to seem to find it anymore.
I agree with @ lleachii, turn of Masquerading on the WAN of your downstream router could do the trick.
For that you also need to set a static route on your primary router e.g. ip route add 192.168.10.0/24 via 10.0.0.X where 10.0.0.X is the WAN address of the downstream router