I have a setup running OpenWrt 22.03.3 where I have multiple interfaces such as LAN, guest, wireguard VPN for remote access etc.
Can I set different DNS servers for those interfaces?
The reason is I want to redirect DNS for the LAN and guest interface to a Pi-Hole container running in docker on the OpenWrt system. But DNS on other interfaces, such as the Wireguard interface, I would like to still use ISP DNS for resolving the peer's hostname.
If the Pi-Hole container for some reason is down I would still like the Wireguard interface to be able to resolve the peer so i can remotely manage and troubleshoot the system.
Can I set e.g /mywireguardpeer.example.com/1.1.1.1 so the wireguard peer domain name is always resolved with cloudflare? Is this what this setting is used for?
Option #2. If the domain mywireguardpeer.example.com is resolved it uses a specific DNS server for only that domain name. All other DNS queries are resolved using the Pi-Hole, Adguard or similar.
This is just to ensure that even if the Pi-Hole instance is down, the router can still resolve the hostname of the wireguard peer, and letting me SSH into the (remote) router for troubleshooting.
I don't have physical access and the router is behind CGNAT, so the wireguard connection has to be started FROM the router (to another OpenWrt router in a site-to-site config).