How to define which devices should use traffic over VPN (wireguard) and which not based on MAC address?

I have an MT6000 with firmware customized by GL-inet based on OpenWRT 21.02. It has a very convenient function where you can configure which devices should have VPN restricted traffic and which should not based on their MAC address in a few clicks.

I would like to use the same function in the latest OpenWRT, but I still have the basic knowledge to do everything manually. Is there any package, script or something similar that makes configuring this function easier?

Example of what I would like:

  • Configure VPN with Wireguard ~> select which devices should have VPN restricted traffic. The remaining devices would use the ISP's standard traffic.

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

It's much easier to create two separate networks.

The focus is to use this function in pure OpenWRT. I cited the GL.inet firmware to demonstrate that it is something possible to do because they use OpenWRT as the basis for their software.

Could you recommend a tutorial on how to create a second network configured with Wireguard?

If you use the genuine OpenWRT software you can use Policy Based Routing (PBR), see: https://docs.openwrt.melmac.net/pbr/