Conditional forwarding on multiple VLANs

Hi Gents

I'm new to Pihole, and linux for that matter, and am battling with getting the conditional forwarders to work.

I've followed what everyone else is doing above by creating a new file called 02-custom.conf in /etc/dnsmasq.d folder.

I've edited the file and added the following:

server=/localdomain/192.168.5.1
server=/boys/192.168.7.1
server=/frog/192.168.9.1
server=/guest/172.16.4.1
server=/tv/192.168.6.1

As I understand it, the names after the =/name is the domain name for that network and the IP is the default gateway / DHCP server for that specific network. However, Pihole is still only showing IP's for those networks and not resolving the addresses. I'm also using a Ubiquiti USG 4 Pro for my DHCP server etc.

Any help greatly appreciated.

Thanks

Gavin

To have reverse lookups work (to get the hostname of an IP address), you need to define more rules (example for localdomain:

server=/5.168.192.in-addr.arpa/192.168.5.1
3 Likes

Hi Mcat12

Thanks for the info. It's not quite what I want to do. In the gui you can setup Conditional forwarder which then does the lookup from your dhcp server. This works fine with a single subnet. I'm trying to get it to work across all subnets and what I have listed is the domainname for each subnet and the default gateway which is how I understand you'd do it through the custom config file? Does that make sense?

Thanks again for the help!

Gavin

Many thanks

Gavin

The config rule I suggested will do that for you. The conditional forwarding option uses that kind of rule in addition to a rule in the form of the ones you already have.

Hi Mcat12

Thank you I've just added that for all subnets before the previous entries and appears to have done the job!

I really appreciate the help and quick response!

Many thanks

Gavin

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