Forgive me, I am a newb. I am trying to set up conditional forwarding on Pi-Hole. I created a custom.conf in /etc/dnsmasq.d I am trying to resolve my ip addresses with a client name. I put in the following "rev-server=192.168.7.1/24,192.168.7.1" and the queries still show an ip address. 192.168.7.0/24 is my VLAN and 192.168.7.1 is my gateway.
That looks about right for reverse lookups (note that you can configure Conditional Forwarding via Pi-hole's Settings | DNS, though).
You did run pihole restartdns
for the changes to take effect, didn't you?
For that forwarding to work, your router's DNS needs to provide the correct replies. Let's check if it does - please share the output of:
nslookup <ip> 192.168.7.1
where you substitute <ip>
with your Pi-hole machine's IP address.
Also, please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
pihole -d
or do it through the Web interface:
Tools > Generate Debug Log
Above only forwards reverse lookups for a single IP 192.168.7.1.
If want to forward reverse lookups for the entire 192.168.7.0/24 subnet, you'd want below:
rev-server=192.168.7.0/24,192.168.7.1
But if its a single rev-server= directive that you want to apply, I would do that via the webGUI "Conditional Forwarding" setting like Bucking_Horn noted above.
That would configure Pi-hole like below:
$ rgrep server= /etc/dnsmasq.*
[..]
/etc/dnsmasq.d/01-pihole.conf:rev-server=10.0.0.0/24,10.0.0.2
/etc/dnsmasq.d/01-pihole.conf:server=/home.dehakkelaar.nl/10.0.0.2
Oops, I found out it doesnt matter what you enter for the last octet in below examples:
rev-server=192.168.7.0/24,192.168.7.1
rev-server=192.168.7.1/24,192.168.7.1
rev-server=192.168.7.254/24,192.168.7.1
All above three do exactly the same, forwarding reverse lookups for the whole /24 subnet to 192.168.7.1 (like intended I guess).
https://tricorder.pi-hole.net/5yl3XEh3/
root@Pi-Hole:/etc/dnsmasq.d# nslookup 192.168.3.20 192.168.7.1
** server can't find 20.3.168.192.in-addr.arpa: NXDOMAIN
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.