Pi-Hole VLAN advice using 05-custom.conf or define VLAN interfaces

I use the following lines to send MAC and IP info to my upstream Pihole (10.0.1.5)

"service": {
		"dns": {
			"forwarding": {
				"options": [
					"add-mac",
					"server=10.0.1.5",
					"add-subnet=32"
				]
			}
		}
}

I had a similar approach once but decided to block non-router/pihole DNS traffic completely. So far all devices (google) fell back to the DHCP announced DNS servers. You'r approach should work too, but I think in such cases they will appear in your pihole as if coming from your router (including the MAC?) and EDNS(0) will not work with redirected traffic.

Ok, thx.
Do you think adding a second server IP would work? (I have 2 Pihole's)
So, you've set all you vlans to default dhcp dns, and changed the ones from your WAN to the Pi-Hole?

I would start with one and see how it goes. I'm not 100% sure about the syntax, but guess a second DNS server needs a second server= line.

Exactly.

Hi,

I've got it all working after a factory reset of my Ubiquiti switch.
The solution provided by @deHakkelaar as response to my original post seems to be working perfect.
Except that the vlans need to be set in a vlans in file dnsmasq.d folder instead of directly into the dnsmasq.d file. Also there's no need the install the vlan package or 802.1q mod.

Thx!

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