Routing between subnets

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
zizebra
Posts: 2
Joined: Tue Dec 31, 2024 6:45 pm

Routing between subnets

Post 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.

Lantis
Moderator
Posts: 7063
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Routing between subnets

Post by Lantis »

You can try adding
option masq_dest !192.168.0.5/32

To the firewall config, wan zone.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

zizebra
Posts: 2
Joined: Tue Dec 31, 2024 6:45 pm

Re: Routing between subnets

Post by zizebra »

Thank you Lantis. That worked beautifully.

Post Reply