# Multiple browser instances through different OpenVPN servers

browserPROXYvpn

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.

Edited

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.

• # 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 8888:example.com:80 user@1.2.3.4
ssh -L 9999:example.com:80 user@4.5.6.7


## Each browser instance hits a different port.

Have one browser point to 127.0.0.1:8888 and another to 127.0.0.1:9999

## Problems

• 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 127.0.0.1:8888 or 127.0.0.1:9999 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.