.d8888b. 8888888888 .d8888b. 888888888 .d8888b. d88P Y88b d88P d88P Y88b 888 d88P Y88b 888 888 d88P .d88P 888 888 888 888 888 888 888 d88P 8888" 8888888b. Y88b. d888 888 888 `Y8bd8P' 88888888 "Y8b. "Y88b "Y888P888 888 888 X88K d88P 888 888 888 888 Y88b d88P .d8""8b. d88P Y88b d88P Y88b d88P Y88b d88P "Y8888P" 8888 8888 d88P "Y8888P" "Y8888P" "Y8888P"

[ Autor: Nicholas Ferreira ]

[0b0100] VPNTabs


On newer version of Firefox, it is possible to use container tabs, which isolate the cookies from the normal tabs.

It is also possible to assign different proxies to be used in different containers using Container proxy.

Then, we can create a docker container with a VPN client and a proxy server running. By doing this, we can assign our docker proxy to a container tab so that all the traffic of that tab goes through the VPN that is running only inside the docker container.



1. Install Docker

See instructions here

2. Clone the repository

nich0las@0x7359:~$ git clone https://github.com/Nickguitar/VPNTabs

Important note: if your user doesn't have permission to run docker containers you will need to run the script with sudo.

3. Place your VPN files in the directory ovpn_files

nich0las@0x7359:~$ cp /path/to/vpn/files/* ovpn_files/

4. Build the docker image

nich0las@0x7359:~$ ./VPNTabs --build

5. Run the container with the specified ovpn file or with --tor

nich0las@0x7359:~$ ./VPNTabs --run [<OVPN FILE>] [--tor] [--port ] [--name ]
nich0las@0x7359:~$ ./VPNTabs --run mullvad_us_all.ovpn --port 3131 --name VPN
nich0las@0x7359:~$ ./VPNTabs --run --tor --name Tor

[Alternative] Instead using VPNTabs You can run your custom script or use docker-compose. Here is an example:

nich0las@0x7359:~$ docker run -d \
--cap-add=NET_ADMIN $
--device /dev/net/tun $
--sysctl net.ipv6.conf.all.disable_ipv6=0 $
-p 3128:3128 $
-v :/ovpn $

The envoriment variable OVPN_FILE is used to know which file OpenVPN should use

If everything is ok, you should see port 3128 (or whatever you have chosen) listening on your machine. If you chose Tor, you should see port 9050.

nich0las@0x7359:~$ netstat -tapeno | grep 3128
tcp 0 0* LISTEN 0 5767579 - off (0.00/0/0)

6. Add Multi Account Containers and Container Proxy to Firefox

7. Set the proxy on Container Proxy

Open Container Proxy, click on "Proxy", set protocol to HTTP, server to and use the port you chose in step 2.3 (the default port is 3128; for Tor, the default is 9050). Also, uncheck the checkbox "Do not proxy local addresses". Then, click "save".

Note: For Tor, you need to change the proxy protocol for Socks5

Now, click on "Assign" and change the proxy of the container to the one you've just created.

To use the container tab with VPN, right click the new tab button and choose the container for which you configured the proxy.

You're done

Now every website you access using those container tabs will pass through your local proxy, which points to a docker container whose traffic pass through your VPN. =)