How can I use Wireguard's Search Domains feature with OpenWRT? Ie. this: https://rakhesh.com/linux-bsd/wireguard-search-domain/
or what Network Manager on my laptop provides here:
I tried putting
option dns '192.168.22.233 czf,lan_k' to the openwrt client's /etc/config/network" but that does not work. What is the proper syntax? There is no mention of this on the wiki. It works well with my laptop, so the server is configured well.
I have a openwrt running wireguard as server and I want to set up another openwrt router to be its client. I got it to connect and route between them, but how would I tell it to use the server's DNS for specific domains?
Actually, there was a typo in my question, it was supposed to be
dns '192.168.22.233 czf lan_k' but it does not work.
It turns out I can set this with dnsmasw in
/etc/confifg/dhcp with options like
list server '/lan_k/192.168.22.233' (note this example cannot be set through LuCI as I use "_" character which seems to be illegal in DNS. For this one to work, one also needs to set
list rebind_domain 'lan_k' - all in section
config dnsmasq . This can be also configured via LuCi in 'General Settings of DHCP and DNS with DNS forwardings and "Domain whitelist". The downside is it is not dynamic with the Wireguard connection. But as I have it always on, it does not bother me (one could probably set up some scripts to set it dynamically).