Simulating proxy in VMware

6

2

I'm currently testing out a new proxy system that I'd like to try out on my own computer. Because I do not have an additional PC available, I though I'd do it with VMware. Here's what I'd like to do:

What I want

The physical computer is to make an Internet connection using the VMware proxy and not the router. The VMware machine must have two network interfaces, one to connect to the internet and one to connect to my physical machine with the proxy as DHCP.

  1. Is this possible?
  2. If so, how could I accomplish this?

BloodPhilia

Posted 2010-06-14T15:53:17.710

Reputation: 27 374

Answers

4

There are multiple ways to do this, but here is one approach:

  1. Set the VM to use bridged networking instead of NAT.
  2. Disable the DHCP service (but not the DHCP client for the WAN port) on your router.
  3. Give the virtual machine a fixed IP address in your router's subnet (e.g. 192.168.0.101).
  4. Give the virtual machine another fixed IP address in a different private subnet (e.g. 10.234.0.1)
  5. Set up the proxy and enable its DHCP service (but not its DHCP client). Set it up to distribute a range of non-routable IP addresses within your new private subnet (e.g. 10.234.0.101-150). I presume that the proxy, in this case, is meant to be the default gateway, so set up the DHCP scope accordingly.
  6. Renew the host machine's DHCP lease so that it receives a new IP address from the proxy (e.g. 10.234.0.101).

Miles Erickson

Posted 2010-06-14T15:53:17.710

Reputation: 1 079

Would there be any way to not affect my network, disabling the DHCP of my router is not really an option at this moment... – BloodPhilia – 2010-06-23T19:56:43.877

Let's take a step back. Is it absolutely essential for the host machine to be a client to the proxy? It would be a lot cleaner to set up a second VM to be the client: the host would have no configuration changes, the proxy VM would have two virtual network adapters (one bridged to the host's network and one host-only) and the client VM would have only a host-only adapter allowing it to connect to the proxy. – Miles Erickson – 2010-06-23T22:39:30.757

Why didn't I think of that! Thanks! – BloodPhilia – 2010-06-24T10:23:52.130

0

Yes, this can be done, infact i did it myself. You need to manage the VMNets to create multiple connections to your proxy server. On linux there is a command for this, on windows a gui (i think, i'm a 'nix hacker). This is all pretty well documented in the VMWare docs.

Then you need to find a way to make your computer/browser use the proxy. If you only what to test a browser, this is easy. Just edit your browser settings. If you want to test more extensively i recomend you create a seperate VM, that shares on VMNet with the proxy to test from.

Hope this helps.

thomasfedb

Posted 2010-06-14T15:53:17.710

Reputation: 116

1I'm looking for detailed examples on how to accomplish this, any chance of you supplying me with that? – BloodPhilia – 2010-06-19T17:03:43.387