5

Is it possible to define a VPN per Workspace/Application in Ubuntu?

2
  • (as in, those 4 workspaces that you get with gnome/xfce that you can switch between)
    – Asaf
    Nov 24, 2011 at 5:58
  • @khendrick Workspaces have nothing to do with networking. The only thing that I would even try to guess would be to have a VPN connection for the wireless and the wired connection. I don't know of any VPN solutions that can adequately do this, though. Mar 27, 2012 at 3:40

3 Answers 3

7

No. The networking components have no concept of "windows", "workspaces" or even "applications", while the window manager does not have the possibility to reconfigure the network.

1
  • 1
    such a thing would probably only be possible with a Proxy (since most network applications allow connecting through proxy). Is there a way to use a VPN as a proxy ?
    – Asaf
    Nov 24, 2011 at 10:35
7
+25

You can use multiple VPN connections at one time, if their routes are correctly defined in the spirit of "Split DNS" or "Split Tunneling" with no overlap of their IP segments, and if none of the VPN servers is configured to use VPN Tunneling. As long as you use the right IP addresses, everything else is automatic.

However, such a case is too simple to merit your bounty.

I therefore postulate that you are asking about having multiple VPN connections, each with its own DNS resolver for full Internet access. AFAIK this is impossible, since DNS resolving is done system-wide by Linux and is not concerned with workspaces.

Individual programs may be configured to access the Internet in different ways. For example, you could define 4 profiles in Firefox where each one accesses the Internet differently, but you will still need to create 4 icons, one per workspace, for launching Firefox with the right profile. This doesn't seem to be what you are asking for.

Otherwise, the only other solution I can think of is to use a virtual machine in the additional workspaces, where each VM connects to a different VPN. This solution will even work with VPN Tunneling, but it is somewhat cumbersome to use.

1
  • You can have a separate DNS server for each Firefox profile by using a separate SOCKS proxy per profile and setting "network.proxy.socks_remote_dns = true" in about:config
    – user16115
    Apr 1, 2012 at 12:57
1

This is requires a good deal of work but I think it is possible and requires a great deal of RAM,

virtuialize 3-4 sepearte Linux's then setup each Linux in the seperate workspaces with a VPN

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .