Force host internet traffic through an lxc

3 months ago by jobbies to c/proxmox

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 ๐Ÿ˜…

terabyterex 3 points 3 months ago

i dont know what you know and dont know but at at a high-level. i needed sbanzbd to go through a vpn. so i installed sbanzbd on the same docker vm lxc as gluetun. if a different container needed access to gluetun i woild have to use its builtin proxy

path: 0 24582351, hotness: undefined, score: 3, children: 0
tvcvt 3 points 3 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).

path: 0 24583528, hotness: undefined, score: 3, children: 0
possiblylinux127 -4 points 3 months ago

Don't

I don't see a usecase

path: 0 24586038, hotness: undefined, score: -4, children: 1
spitfire 4 points 3 months ago

Just because you donโ€™t, doesnโ€™t mean there isnโ€™t one.

path: 0 24586038 24586447, hotness: undefined, score: 4, children: 0
proxmox
proxmox

@lemmy.world

login for more options
1926
87
27

Proxmox VE is a complete, open-source server management platform for enterprise virtualization. It tightly integrates the KVM hypervisor and Linux Containers (LXC), software-defined storage and networking functionality, on a single platform. With the integrated web-based user interface you can manage VMs and containers, high availability for clusters, or the integrated disaster recovery tools with ease.

Proxmox VE Official site

K3S on Proxmox LXC

go to feed...