November 17, 20223 yr It would be nice if there were a way to specify DNS search domains in the Wireguard peer config. In the config file, it's specified as extra comma-separated values in the same `DNS=` field as peer DNS servers. I'd hoped I could just add my search domain in that field, but apparently there's some form validation going on that won't allow me to type a domain name into that field.
January 4, 20233 yr I think it must be an IP address. I added my router IP address into the Peer DNS Server field and I can access local domains without issue.
January 4, 20233 yr Author Yes, the field is currently validating that it has to be an IP address. The issue for me is that I have my home network set up such that the local domain names are things like "hostname.home.domain.other.stuff". If I just add the IP address to the DNS field, I can use those fully-qualified names, but I'd like to be able to use just "hostname". Typically that's done by setting the DNS search domains, which Wireguard does actually support, but for some reason they've implemented it as an add-on to the DNS option instead of as its own option 😞 The end result is that the validation (which makes sense if the option is only for DNS servers) is preventing me from setting a related-but-separate option for search domains.
January 10, 20233 yr You are right, using Wireguard I can access local host.domain, but not hostname only. I tried using the Cloudflare tunnel and it was the same. I could reach host.domain, but not hostname only.
May 26, 20233 yr The only way I have managed to get a work around for this is to add the search domain to the network interface. Not idea but does actually stop having to use FQDN.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.