Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 a personal setup at home using VMWare Workstation. I also have a set of Virtual Private Machines that run Squid, and therefore provide me HTTPS proxy tunnels. Using Proxifier, I can tunnel all traffic for given applications through these tunnels.

However, I also have a few virtual machines for dev/staging/experimentation/etc. I generally just use NAT to provide Internet access to the machines, and if I need to use these proxies, I can just setup Proxifier (or a Linux equivalent) to pipe the traffic through them. No problem.

But... I got to thinking: Wouldn't it be great if I could assign these proxy tunnels to a virtual machine, so that when I start up the VM, it has instant-on access through the tunnel and not my local connection? (EDIT: Of course, it would USE my local connection, but it would tunnel traffic through the proxy.)

To be more clear: I want a solution that binds the proxy to a VM, so that when I start the VM, I don't have to use a proxy client to connect to the tunnel - I am already piping all traffic from that VM through that proxy.

I did a bit of searching, and the closest thing I could find was this:

How to route public static IP to a virtual machine on a vmware ESXi host?

Which wasn't all that applicable.

The proxies are protected by user/pass but do not filter by IP. Again, they are HTTPS proxies setup through Squid.

Any ideas on how to make this happen? Thanks a ton.

share|improve this question

From what I understand, you want to :

  • Start a specific VM called 'proxy' (on a VPS, outside your inner network)
  • Start a second VM called 'client' (locally)
  • Have 'client' automatically use SQUID (HTTPS) on 'proxy'.

IF your PROXY & CLIENT is local:

The product you are using (VMware workstation) allows you to create private network that are shared between VMs.

You should use that feature and create a new network lets say Assign a static IP to the 'proxy' VM (lets say & dynamic (and/or random) IPs to the rest of the 'client' VMs.

Configure the 'client' VMs to use 'proxy' as their network gateway. With SQUID configured as a transparent proxy (see: and/or google Squid transparent proxy), you should have exactly what you are looking for.

This network setup will also allows you to set specific ACLs for each and every VMs.

Note, if you use the 'bridged network connection' option in VMware for your 'proxy' VM, that VM will have its own presence on the network. This will mean that your system running VMware workstation could also route toward it.

IF your PROXY is remote and CLIENT is local:

In that specific case, I would recommend using VPN.

In fact, you could maintain a very small local VM which create a VPN between you and your VPS and use it as a gateway (would become very similar to case local/local).

Or you could establish a new VPN automatically on VMs bootup. Using certificate authentication, this is easily done in Microsoft Windows and any GNU/Linux flavour. Careful routing would allow you to select when you want to go through the VPN... (local network vs internet).

share|improve this answer
Not quite. I have VPSes hosted externally; I do not host them on my private VMs. I want to use these external instances of Squid (again, not on my network) through a VM. – Michael B Dec 13 '11 at 1:06
I saw your edit, but I am trying to avoid any client-side processes running that make the connection, as stated in the OP. I want the connection run through the VMWare Network Adapter. – Michael B Dec 13 '11 at 2:17
The VMWare network adapter is a layer 1/2 device. It cannot do routing decision, so you will need a component inside your VM (even if it is only a routing configuration defining the gateway). It can, however be automatically applied through DHCP. The solution could be in the second paragraph for the Proxy/Remote, Client/Local 'proposition', where you have a local VM (call it 'gateway') maintaining 1 VPN for all VMs. The VPN could also be established outside the system (on your office router / another system)... – CloudWeavers Dec 13 '11 at 2:27
I see, I'm not an IT whiz, but I'll look into that and await further answers. – Michael B Dec 13 '11 at 2:33

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.