16

I want firefox on my laptop to only go through a VPN and the easiest solution I came up with is forcing firefox SOCKS5 Proxy Docker Container which goes through a Mullvad gluetun docker container. I connect to my home server via tailscale

Browser < -tailscale- > SOCKS5 Docker <


gluetun Docker <


Internet

Is that a good idea? It seems a little overengineered, but simpler than running two VPNs on one machine?

Thanks

top 15 comments
sorted by: hot top controversial new old
[-] sovietknuckles@hexbear.net 5 points 2 weeks ago* (last edited 2 weeks ago)

I run my VPN and Firefox in a network namespace.

Docker introduces latency, but network namespaces do not.

[-] phase@lemmy.8th.world 1 points 2 weeks ago* (last edited 2 weeks ago)

Docker isn't slow. I do this on linux.

Docker is slow is a way to say that the virtualization is slow on you mac even if it costs a lot.

[-] mox@lemmy.sdf.org 4 points 2 weeks ago

Why not just point Firefox at the proxy address in its Connection Settings, instead of trying to force it with containers?

Are you trying to prevent Firefox from ignoring its proxy setting to do something sneaky?

[-] LazerDickMcCheese@sh.itjust.works 3 points 2 weeks ago* (last edited 2 weeks ago)

I think I'm missing something...why bother with SOCKS5 if you're using a gluetun container? I've never done what you're trying to do, but I'd assume gluten by itself is the solution

[-] tootnbuns@lemmy.dbzer0.com 1 points 2 weeks ago

I want only the firefox browser to connect to my vpn. can firefox itself just connect to a vpn?

[-] LazerDickMcCheese@sh.itjust.works 1 points 2 weeks ago

I'd recommend something like a split tunnel then. And I'm only saying that because I'm not well-versed in networking like this, especially when containers are involved.

But I do have containers routing their traffic through a VPN via gluetun, and it's worked flawlessly.

[-] nsfwpls@lemdro.id 2 points 2 weeks ago

This sounds like it would work. As you said it seems a little over engineered, but I'm not sure how else you would go about only isolating Firefox without a local split tunnel VPN that has a fail-safe switch controlling your network adapter. Would Firefox rely solely on the proxy configuration, or will it make any attempts at using another route if the proxy fails (or it's just programmed to for specific features/extensions/etc)?

If you want a fully isolated browser, you can install Firefox (or Mullvad browser) as a container behind Gluetun. You would then just enter the IP and HTTPS port of your Firefox container in your local instance of Firefox and connect via (web) VNC over Tailscale. All traffic to the container uses HTTPS, goes over Tailscale, and through your Gluetun. Then Firefox has no possibility of using anything but Gluetun, and your browsing (clipboard, audio, hardware info, etc) isn't connected to your laptop at all by default.

This may not be ideal if you're trying to watch a lot of high resolution or high framerate videos though, depending on how high your VNC quality is set and your network capabilities.

https://github.com/linuxserver/docker-firefox

[-] tootnbuns@lemmy.dbzer0.com 2 points 1 week ago

I already have two of those, but it's not as snappy and the intermediate clipboard is also a little annoying. for some use cases they absolutely rock though, lke keeping a session alive or anonymously downloading large files.

[-] rumba@lemmy.zip 2 points 2 weeks ago

I do about the same with a prixoxy/VPN container and ts.

It works, it's not noticeably different than running through the third party VPN on device, just more flexible.

[-] phase@lemmy.8th.world 2 points 2 weeks ago
  1. Start a container with: bash, with --net none, with the X socket.
  2. Start the vpn
  3. Move the vpn interface to the net namespace of the container
  4. Install firefox in the container
  5. Browse
[-] eldavi@lemmy.ml 1 points 2 weeks ago

i'm unfamiliar with mullvad; is the container hosted on your laptop? is it split tunnel?

[-] tootnbuns@lemmy.dbzer0.com 1 points 2 weeks ago

I'm hosting a container on a my home server that I access via tailscale. mullvad is just the vpn provider I'm using with gluetun, which is a vpn docker container

[-] eldavi@lemmy.ml 3 points 2 weeks ago

and setting up the vpn on the server itself is not an option? how about using a browser plugin?

[-] PullPantsUnsworn@lemmy.ml 1 points 2 weeks ago

Tailscale already has Mullvad integration. Why don't you utilize that?

[-] tootnbuns@lemmy.dbzer0.com 1 points 1 week ago

I only want the specific browser to connect to mullvad.

this post was submitted on 13 Dec 2024
16 points (100.0% liked)

Privacy

32506 readers
1180 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS