Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 vpn connections and I want to be able to connect on both of them at the same time, running Fedora 18. My main idea was to run VirtualBox with 2 virtual machines, connect each of them on the VPN and then SSH to each machine to access both VPNs. But then I thought there must be a way to do it in one machine. I mean there's no point of running a whole operating system just to get 1 connection.

I am aware of nm-tool but I think if I connect a VPN it "wraps" all the connections. Is that right? Is there a way to create, lets say, eth1 eth2 or eth0:1 eth0:2 and assign 1 VPN on each?

If there is no possible way of doing it in one machine and I have to stick to the VM solution, what configuration would you recommend to use less hardware resources? (distribution, ram assigned, etc.) hence if I stick to the VM solution I would only need the VM for the connection and nothing else.

(Any solutions are accepted, but I prefer command line if possible.)

share|improve this question

migrated from Jan 26 '13 at 17:34

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Use vpnc. This does not wrap all connections, but adds a new interface for the vpn.

You will create a new file in /etc/vpnc/ for each configuration. There is a default.conf file as an example, with everything commented out.

If you have vpn1.conf and vpn2.conf in that directory, you'll start the vpns with the commands vpnc vpn1 and vpnc vpn2 (or perhaps something like vpnc --enable-1des vpn1 -- see the manual page for vpnc).

I recommend making /etc/resolv.conf immutable when using vpnc as it will overwrite it. I usually don't want the vpn dns, and if you have two, it is sure to be unhelpful.

share|improve this answer
thx a lot for your reply. My bad i should mention i am using openvpn. But your answer made me understand it's a vpn client issure rather than os issue. So i can do something like: sudo openvpn --mktun --dev tun2 sudo ip link set tun2 up ifconfig now gives a tun2 found this information here: [link] – user2011809 Jan 26 '13 at 23:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.