Multiple browser instances through different OpenVPN servers


How can I config multiple instances of browser to connect through different VPN servers?

I'm working in a Linux server and I need that every browser instance uses different VPN servers.


The goal is navigate simultaneously the same web page with 5 different Selenium instances, when every instance should have IP from different countries.

So, the solution that I thought was using different proxies when every proxy use a VPN.

Does that make sense?

I'm very newbie to these topics, so if the SSH is a good solution, I would like receive more information about how to get a right connection with the SSH solution. Please help me to understand what does it mean to use every param on the connection and how to config a proxy for that.

Best Answer

  • Per browser window proxy

    It is unlikely that there is a solution for this on a per tab basis. However, you could use the profile feature (or incognito) to allow multiple instances of the browser. Each browser window then can manage its own extensions, thus, can manage its own proxy settings. Here is how I did it in Chrome.

    • In the upper right corner of the browser window, click the button for the current user. It may show that person's name, email, or an icon shaped like a person.
    • Click Switch Person.
    • At the bottom of the window, click Add Person. Create a new account.
    • Install Proxy SwitchOmega. There are many proxy management extensions in the chrome store, this is the one I tried and it worked for me. Configure it for this window. The settings will not be shared to other personas.

    Per tab proxie (but not really)

    I don't think I have a possible workaround without using separate browsing instances. You mentioned that you are doing this to one page. In that case, you could do this by using port redirection on your local host.

    Set two SSH Port Redirects

    For example, two set up two SSH port redirects through two different servers, you could use the following commands.

    ssh -L user@
    ssh -L user@

    Each browser instance hits a different port.

    Have one browser point to and another to


    • This isn't a VPN. You can't guarantee all of the browser traffic will go through the SSH connection. For example, any resource fetching images or scripts on external domains will travel through your host connection. Only resources for the targeted or will be routed through the tunnel. If the webpage has absolute urls, you will have to manually edit the links to reflect the port.
    • The server may be picky about the Host: header. In this case, you could use a header editing extension to set the header statically.