Comment by symlinkk

4 years ago

Inbound and outbound for a certain port should go through the VPN, inbound and outbound for all other ports should be through the open internet

When talking about networking, nobody talks (until it really matters) about how replies would flow back.

So if you initiate the traffic then this is an outbound traffic; if someone else initiate traffic with your host, then this is inbound traffic.

I think you can wade through a multiple "how to route specific traffic through VPN in linux" articles on the net to find one what would suit you.

I’m not sure what your running exactly, but a network namespace with a wire guard interface might get you what you are after