Wireguard client need only on 1 PC

I have router Xiaomi ax3200 im using OpenWrt, i have 2 pc, and use wireguard client in my router, how i can use wireguard only 1 pc ? Which settings need? Thx u

Use policy based routing to set specific policies for the computer that needs the vpn vs those devices that don't...

https://openwrt.org/docs/guide-user/network/routing/pbr

(alternatively, you could just remove/disable WG in the router and install it only on the PC that needs it).

2 Likes

Alternatively, you could make:

  • An IP route for 0.0.0.0/0 (default route to Internet) on an alternative routing table (e.g. Table No. 1 - using names requires more configurations) - interface WG
  • Plus, an IP rule for the individual IP - target 0.0.0.0/0 - to use Table No. 1

No additional packages needed.

EDIT:

  • You'll need to give the IP rule a Priority Number (e.g., 1)
  • You may need to masquerade traffic exiting the WG, this is usually configured by default if you added the interface to the WAN firewall zone
2 Likes