I have an lxc running a VPN, and where the host needs to access the internet (e.g. doing updates) I want to force that through the lxc VPN.

I dont want to interfere with local lan or cluster traffic - so just setting a default route isn't appropriate. Likewise I'm not sure just installing the VPN on the host is the right idea.

I'm pretty sure there is a way of doing it... its just not coming to me 😅

you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 4 months ago

It sounds like you do want to set the default route to the LXC’s address. Then set individual routes for the local LAN and cluster traffic. The routing table will prefer the more specific route (e.g., if you’re trying to get to 192.168.0.14, it will prefer the route you set for 192.168.0.0/24 instead of the default, which is equivalent to 0.0.0.0/0).

  • source