Page 1 of 1

Routing between subnets

Posted: Tue Dec 31, 2024 7:02 pm
by zizebra
hi all
hoping you can point me in the right direction. I have two subnets 192.168.2.0/24 where all my family devices are connected. This subnet is served by Gargoyle. This device has access to the internet through another dlink router. The Dlink has 192.168.0.0/24. On this network i have a new pihole device that i have deployed to provide DNS adblocking . i have routing between the subnets. However my challenge is that all traffic from 192.168.2.0/24 to 192.168.0.0/24 is NATTED. As result pihole records all DNS requests as coming from gateway address 192.168.2.1. And if i place the pihole on the 192.168.0.0/24. i get the IP address of the router as the DNS requestor. I would like to retain the current structure in the picture and ensure that all devices on the 192.168.2.0 show up with their original IP addresses on the Pihole. In other words all DNS traffic to 192.168.0.5 must have original IP addresses and not use NAT address.

Re: Routing between subnets

Posted: Wed Jan 01, 2025 1:02 am
by Lantis
You can try adding
option masq_dest !192.168.0.5/32

To the firewall config, wan zone.

Re: Routing between subnets

Posted: Thu Jan 02, 2025 9:26 am
by zizebra
Thank you Lantis. That worked beautifully.