3

I have various types of VM's running that I'd like to use my local host machine's proxy settings. This way any browser activity from the VM would go through the host proxy even if the VM's proxy settings are turned off. But they seem to ignore the settings and just go straight out to the internet bypassing the proxy. I'd like the same response from smart phone emulators installed on the host. But they ignore the host settings as well. How can they even do that in the first place???

Help?

IAmAN00B
  • 131
  • 1
  • 1
  • 3

3 Answers3

7

Considering that your nick is "IAmAN00B" I'll start from the beginning.

Pretend in your mind that each virtual machine is in fact a separate computer sitting on your desk. Instead of say, one computer with three VMs, imagine that it's four computers sitting side by side.

The computer on the left can't control what the computer on the right does.

Now stop imagining. This is actually how VMs work. In almost every way each VM is it's own completely autonomous computer. Any settings on the host computer has absolutely nothing to do with anything at all whatsoever with what goes on in the VM.

The only way to get even close to what you're asking is to run a transparent proxy on your network. If you just thought to yourself "Yes! That's exactly what I want" then I hope you're in the mood for reading. I would suggest starting with Squid.

bahamat
  • 6,193
  • 23
  • 28
  • Thanks for the explanation. And yes, I did already know it's like a completely separate machine. However, those VM's still have to travel through the NIC on the host machine. The traffic must therefore be capturable somehow. I'll take a look at Squid and see what it offers. Thanks again! – IAmAN00B Feb 03 '11 at 17:27
  • 2
    It's capturable by a transparent proxy or things that operate at the network layer. When you set a proxy on your hosts's global settings, it's up to each application wether or not it will reference and/or obey that. E.g., on Windows if you set a proxy in the Control Panel, Firefox does not use it. Firefox has its own proxy settings. So there's no way for an app inside the VM to know what the host's settings are. That "global" proxy setting doesn't force anything and as far as each guest is concerned the host is a completely separate computer in every way. – bahamat Feb 03 '11 at 17:59
0

You may probably achieve this by configuring the guests networking in NAT mode, thus they would share the host IP, as for redirecting traffic to the proxy you may use source routing at your firewall to redirect them to the filtering proxy.

Maxwell
  • 5,026
  • 1
  • 25
  • 31
0

I dont know any native way to achieve this, however what you could do is run a VM on a windows host. Install proxycap and make the process running the guest VM trough a proxy. Nasty but it should work