Wireguard access for a single IP in the lan

Hey there,

I want to use Wireguard for a single device connected via wifi in my home network (all the other devices should use the normal wan).
What would be the most simplistic method to achieve this with the actual 19.07.

Any help is highly appreciated.

vpn-policy-routing package.

One rule and one static route.

1 Like

I finale manget what I was my original intend by following the infos from here:

I basically ended up with two wifis one for direct acces over my ISP and one using the Wireguard, so I can easily switch between them just changing the wifi I am connected to.

one question:
I added the following from the link to a startup script:

ip rule add priority 32000 from all lookup main
ip rule del priority 32766
ip route add default via xx.xx.xx.xx dev wg table vpn
ip rule add priority 32100 from 192.192.99.0/24 lookup vpn
ip route add $(ip route show 0.0.0.0/0) table default
ip route del default

I would however prefer to add it to the network file but don't know how to translate it.
Any help is highly appreciated!

Thx!

https://openwrt.org/docs/guide-user/network/routes_configuration