I'm configuring my OpenWRT to forward its requests to my pi-hole on a rpi4. I've already setup the firewall forwarding rule to get my lan clients to use pi-hole. In order to capture the OpenWRT router itself I've read here to use Network>DHCP and DNS>Forwards but I'm unclear on what info (and format of that info) goes into the DNS Forwards and Additional server files boxes.
Hopefully this request is clear. Please let me know if any additional info is needed.
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
list dns '192.168.1.207'
option delegate '0'
In firewall, I've configured a redirect to port 53 to the pihole with an exclusion for the pihole itself
config redirect
option dest 'lan'
option target 'DNAT'
option name 'Forward to Pihole'
option src 'lan'
option src_dport '53'
option dest_ip '192.168.1.207'
option dest_port '53'
option src_ip '!192.168.1.207'
option family 'ipv4'
and added a firewall rule to deal with DoT
config rule 'dot_fwd'
option name 'Deny-DoT'
option src 'lan'
option dest 'wan'
option dest_port '853'
option proto 'tcp udp'
option target 'REJECT'
and finally added a firewall NAT rule to deal with unexpected source errors
config nat
option name 'Prevents unexpected source error on redirect to pihole'
list proto 'all'
option src 'lan'
option dest_ip '192.168.1.207'
option target 'MASQUERADE'
This config appears to be working. I'm thinking now that having the router use the pihole for DNS isn't needed.