You are not logged in.

#1 2015-04-19 11:16:49

maggie
Member
Registered: 2011-02-12
Posts: 255

Can I keep a VPN using OpenVPN and web traffic in a linux container?

I am using virtualbox to connect to my vpn host using openvpn. Inside the VM I can browse the web anonymously with firefox. The problem is that I need to start the VM each time I want to anonymously browse because I do not use it all the time. The VM is slow and sucks the battery on my laptop.

I am reading about linux containers which use much less overhead but the concept of them is hard for me to understand. Can I use a linux container to run openvpn to connect to my vpn host and then run firefox inside the container too? I want the firefox instance to be using the openvpn instance inside the container so it will be using my vpn. Is this possible and will it work to keep my web traffic 100% through my vpn just like my VM?

Offline

#2 2015-04-19 11:54:34

Lynden
Member
Registered: 2011-11-10
Posts: 23

Re: Can I keep a VPN using OpenVPN and web traffic in a linux container?

I don't have any experience with this particular problem, but two things come to mind: firejail or systemd-nspawn.
Both are bindable to a specific internet interface so perhaps you can bind it to the tun interface of openvpn?

https://l3net.wordpress.com/projects/fi … usage/#net
http://www.freedesktop.org/software/sys … spawn.html

Offline

#3 2015-04-19 14:03:40

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Can I keep a VPN using OpenVPN and web traffic in a linux container?

I do something similar to run transmission inside a Docker container. You can probably adapt that to run Firefox instead with some research on running GUI apps inside containers.

Scott

Last edited by firecat53 (2015-04-19 14:04:37)

Offline

#4 2015-04-19 21:32:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Can I keep a VPN using OpenVPN and web traffic in a linux container?

...shall we assume from the success you have met with in your other recent posts on this topic that you know the answer now to be, "yes?"

Offline

#5 2015-04-20 01:20:57

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Can I keep a VPN using OpenVPN and web traffic in a linux container?

Yes, I think so. Using a bridge, is there any security risk?

Offline

#6 2015-04-20 11:53:53

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Can I keep a VPN using OpenVPN and web traffic in a linux container?

Maybe depending what you want, you can just run in other network namespace. (ip netns)

Offline

Board footer

Powered by FluxBB