Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
It'd be nice to know what hypervisor you're running. –  ErnieTheGeek Feb 3 '11 at 18:24

2 Answers 2

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.

share|improve this answer
    
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 3 '11 at 17:27
1  
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 3 '11 at 17:59

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.

share|improve this answer

Your Answer

 
discard

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.