this post was submitted on 10 Jul 2023
2 points (75.0% liked)
KDE & Plasma users
2768 readers
1 users here now
KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE's software runs on GNU/Linux, BSD and other operating systems, including Windows.
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you really want to get deep into it, network namespaces are pretty cool.
You can connect the VPN on the host and then move the tun device into a network namespace, and then you can run programs in that namespace and their only view of the network will be that single tun device. So no VPN outside, forced VPN inside. And you don't even need a container filesystem or anything, it's still entirely your host OS, only the network gets sandboxed. The only gotcha is some things like Chrome/Firefox that will end up just opening a new window of the existing instance, but that's easily fixed with a secondary profile or making sure to start the browser in the namespace first.
This can all be managed with the
ip netns
command.That'd be my personal recommendation and I used that extensively while I was working for PIA. Once you figure it out it's really not that complicated.
You are right, this is a cool idea. I'm digging into it. Might be more work than I want but the functionality is better.