Installing vpn

When you initially start your router, the WAN sets up and the system uses that as the default route. When you start wireguard, it changes the default route to the WG tunnel instead of the one provided on the WAN. If you don't specify a 'metric' for routing on the WAN, "change" --> "replace". Meaning that the original route is now gone. The only way to get it back once it is gone is to restart the WAN interface.

But putting a metric in the configuration for the WAN will keep the route in place. Instead of replacing the route with the one from WG, the system will add a new route (via WG) and leave the original one intact (just lower priority, when you set your metrics appropriately).

Well okay, sounds interesting. Should I do that? If so, how do I do it?

In LuCI, you'll find the metric under the interface > advanced settings > "use gateway metric"

And what metric do I need to put in there? (I am an compleet noob with networking, so sorry for my, probably, stupid questions)

The lowest one (other than zero) has the priority. If you put a metric of 2 in WAN and 1 in WG, that should do what you want.

Something like this?

yup... that's the idea.

And then Openwrt will be doing this automatically when the tunnel is down etc?

that's the intent. Give it a shot by starting and then stopping the tunnel and you'll see if it works as expected.

.. and since you've traveled from OpenVPN to Virtual Machine to get WireGuard up, and seen the contributions all have made along in your journey (I was just a spectator), when you find need to peel off one or more items/IPs/devices to not be on "Dutch" by default.

Find this interesting Thread

1 Like

I will try.

It does not work.

maybe start a new tread for this issue since it is a bit of a different animal.

I will, but for now I want to thank you very very much. I am struggeling with this problem for so long! Now I can finally try to bypass the geolocation!

Before you go... Another tool to test your WireGuard and the mastering of keys, endpoints with a visual interface for popular OS'es can be found by the Developer's site. Thank you Jason A. Donenfeld. All Rights Reserved. "WireGuard"

Thanks @Bill ! I will give it a look and I learn myself something more about this.

Two weekend project and you've been exposed to a lot!!!! You managed all conversations and the translation of the data well.
You deserve a trophy too.
Enjoy your journey.

Thanks for being that nice @Bill. I appreciate that :+1:

1 Like

Hey @Bill thanks for referencing this. I'm surprised not more users are using this approach because it's super simple and highly configurable.

I'm not using it yet!! But I bookmarked it and obviously have shared it; it'll be easy to remember.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.