Forward all traffic from VirtualBox vm through ssh tunnel

This is for discussing general topics about how to use VirtualBox.
Post Reply
pdcd
Posts: 3
Joined: 30. May 2008, 11:29

Forward all traffic from VirtualBox vm through ssh tunnel

Post by pdcd »

OK I'm trying to do stuff through a ssh tunnel. I set it all up within the XP install on the VM and it works fine for some stuff and other stuff applications just aren't launching right. I'm using Putty and Freecap to do this within windows. So, like I said I can verify the tunnel is working and when I launch some applications that use the net, they work fine, but other apps don't launch at all.

So, what I want to do is run the tunnel on my main computer, and tell VirtualBox to do all network stuff through the exterior tunnel. The only problem is, if I set up the tunnel and launch VirtualBox from Freecap, when I tell the VM to run, it is still using the regular network. I tried messing around in the network settings of VirtualBox but nothing seemed to work.

Help!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

I don't see this as a particular VB problem. It's more like 'I'm connecting to a different computer and I want all the traffic that pc generates (either internet or other) to run through my computer using the SSH tunnel'.
If that is indeed your idea, please go to a more professional forum as this is all about VirtualBox and not advanced networking like the one you describe.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
pdcd
Posts: 3
Joined: 30. May 2008, 11:29

Post by pdcd »

Well I don't see it as a VB problem, but VB has networking settings inside of it. You can sit there and change network stuff. I'm wondering if there's something I can change to force traffic to a particular place.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Not with VB. I don't even think VMWare can do that. This is more advanced networking than your avarage virtualisation can do. All they provide is access to network adapters, not how traffic flows from one computer to another. That is taken care of by the routing table on the OS.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
NeBlackCat
Posts: 154
Joined: 3. Aug 2008, 13:37

Post by NeBlackCat »

What's your host? If it's Linux, don't you just want to bridge the virtualbox tun (the host end of the virtual NIC in the vm) with an SSH tun? Then it's all transparent to the vm - no need to start anything in it.
sickill
Posts: 3
Joined: 17. Nov 2011, 12:15
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Linux, Windows XP

Re: Forward all traffic from VirtualBox vm through ssh tunne

Post by sickill »

Here's exactly what you want (if you use Linux-based host): http://ku1ik.com/2011/11/12/tunnel-vm-network-ssh.html
Post Reply