You cannot do that via the setupVars.conf
because that file is the configuration file for the local installation of Pi-hole.
In order to achieve what you want, you need to create a file under /etc/dnsmasq.d/
Call it something like 99-DNS.conf
or something easy for you to track by. Doesn't have to be numbered or anything.
Then, you'd have to add this particular line to the file:
dhcp-option=6,192.168.1.2,192.168.1.3
Change the IPs to whatever you want/need and remember to restart the Pi-hole DHCP ( with pihole restartdns
) server in order for the settings to propagate. Use a comma (,
) and no spaces in between multiple IPs.
You would also have to release/renew on the clients for the new DNS settings to be pulled from the DHCP server (or they will be auto renewed when the lease expires).
I am using the same configuration to push 3 DNS servers: