Wireguard setup

I have successfully setup openvpn server on my owrt x86 system and it has been working great with one exception...the network speed.

Now I want to try wireguard but after reading the openwrt guide and others I haven't seen where I can use my domain name to connect to the wireguard server. Right now my openvpn connects using my domain name which points to my IP and the IP gets updated via dynamic dns.

So, how does wireguard achieve this?

1 Like

probably this will give some idea if owrt wiki did not answer your question. just generate a new config with default data and check client config for Endpoint section.

  • If you have DDNS on your router, this doesn't change when switching to Wireguard
  • You can use hostnames as the peer endpoint address in addition to using IPs

That wireguardconfig link was interesting but it didn't seem to really be easily applied to the openwrt server application (at least not to me).

What helped me get going was a combination of the openwrt wireguard guide and this link https://www.reddit.com/r/openwrt/comments/bahhua/openwrt_wireguard_vpn_server_tutorial/

And I have to say it was easier overall to setup the openvpn server and clients versus wireguard.

The good news is my network speeds from my mobile device using 5G and connected to the wireguard vpn (into my home network) is amazingly leaps and bounds better.

With openvpn I was getting 30Mbps down on a good link despite being on 5G. With wireguard I was able to break 600Mbps down consistently. This is apparent when streaming from my emby server or accessing all other home network resources. So wireguard is definitely the improvement I needed.

The bad news, my local dns is not working.

With the openvpn setup I was able to browse all network resources via their hostname. With wireguard, this isn't happening. I have spent my last amount of free time I have for this week in trying to figure it out and I have been unsuccessful.

If anyone has any ideas that would be great.

While I am on 5G my device does get an IPv6 address along with an IPv4 address. My home ISP only provides me with an IPv4 address and so my local network is also all IPv4.

With that said, I think my local dns lookups might have something to do with my incoming connection being on IPv6 but I am not sure. I also have a pihole setup which, with no changes to pihole, was able to work just fine with openvpn.

Again any ideas on how to get (at the least) local dns working while connected to my home network through the wireguard server would be great.

Can you better clarify the domain issue you're having?

I'm not sure if you're having an issue reaching the server by a hostname: or an issue with DNS lookup while connected thru wireguard.

Also, what do you mean local DNS (e.g. you configured Wireguard to use a DNS server and can't lookup names like openwrt.lan)?

So my lan setup is using the "local" domain for the lan clients.

When I am connected to my lan internally I can reach all my lan clients via their hostname without needing the .local extension.

When I am connected via the wireguard connection I have to use the .local extension.

For example: lan connected = openwrt/ to access via web browser. Vpn connected = openwrt.local/ to access via web browser.

With the openvpn server setup this did not happen.

The use of .local is not supported across subnets/VPNs. It is a special purpose TLD that is now used for mdns purposes.