VMware host-only...

Soldato
Joined
18 Oct 2002
Posts
4,229
Location
Nottingham
Hello,

I'm using VMware Workstation and have created 3 windows servers and 1 win7client for my virtual lab.

The network adapter for each vm is set to "Host-Only" using VMnet1 adapter.

They where each assigned dhcp address in the 192.168.174.1 range

I then assigned static IP's to each vm and they can all see each other fine. But more importantly cannot see my physical computer on 192.168.0.9

I would like to get just 1 of vm's access to the web, vm1 running server2008r2.

How can I achieve this with my current setup, I cannot see my gateway of 192.168.0.1 ??

Someone suggest using RAS in windows server ?

Any help or advice would be great :)

Thanks Ben
 
It's possibly overkill and someone may have a better way but I've always created a small VM with 2 network adapters, set one to NAT and the other to your host only network linking to the VMs you listed. Then install a lightweight firewall distro such as pfSense and configure the NAT interface as WAN and the host only interface as LAN. Set a static IP for LAN and leave WAN as dynamic.
 
I do this all the time. Create a small VM with Smoothwall Community Edition and two network adapters, one bridged to your hosts ethernet adapter (RED) and the other attached to your host only network (GREEN). I put static assignments for DHCP in Smoothwall and set the hosts to be DHCP clients and no worries about address clashes any more, plus adding new clients to the private LAN is simple.

You could use any firewall appliance I just use Smoothwall because it's small and efficient and I'm familiar with it.

Peter
 
same as above really, add extra network adapter on nat, then another vm and firewall if you really want to but you dont have to.
 
I do this all the time. Create a small VM with Smoothwall Community Edition and two network adapters, one bridged to your hosts ethernet adapter (RED) and the other attached to your host only network (GREEN). I put static assignments for DHCP in Smoothwall and set the hosts to be DHCP clients and no worries about address clashes any more, plus adding new clients to the private LAN is simple.

You could use any firewall appliance I just use Smoothwall because it's small and efficient and I'm familiar with it.

Peter
Exactly this. I use Vyatta, but exact same principle. Setting up RRAS in Windows is a bit messy, and you may end up with unintended consequences. Using a firewall VM is the cleanest and most elegant way of bridging two networks.
 
Just another me too post but I do the same as above with PFSense with one NAT interface, and any others running as host only coming off that.
 
Thanks for the information, ill have a look at Smoothwall Community Edition :)

Got any download link's ??

Can only see Smoothwall Express download's
 
Ok, smoothwall downloaded and installed on a VM.

It has 2 network adapters;

RED - bridged 192.168.0.150

GREEN - host only 192.168.174.30

I've connected to smoothwall via the web interface on; http://192.168.174.30:81

My vm's are using static IP's in host only mode.

vm1 - 192.168.174.10
vm2 - 192.168.174.11

How do I enable and direct the vm's to the smoothwall box for web access ?

Thanks :)
 
If your SmoothWall interfaces are configured correctly, you should just have to set static IPs on your VMs in the same subnet as your SmoothWall's LAN interface. Set SmoothWall as your default gateway and DNS server, unless you are setting up a domain controller. In which case, set a forwarder in DNS on the DC to point to your SmoothWall instead and have your other VMs resolve DNS against the DC.
 
Just got back round to messing with this, still struggling with web access from the VM lab.

Physical PC running VMWare Workstation - 192.168.0.200

VM domain controller 2012r2 running DHCP and DNS - static 192.168.111.20 (running host only)

VM client win8.1 set to DHCP 192.168.111.120 (running host only mode)

VM Smoothwall adapters RED-192.168.0.150 (bridged mode) / GREEN-192.168.111.2 (host only)


I've set a forwarder on the DC for DNS to look at the smoothwall box 192.168.111.2.

I can get no web pages to load, please help :)
 
Fixed it!!

My smoothwall configuration was ok.

DNS on my Server 2012 VM was not configured correctly to start with.

Got that issue solved after plenty of reading setup guides etc.

Happy that DNS was ok but still not web traffic.

Turned out Smoothwall was blocking web traffic on one of the standard rules.

On the networking-outgoing tab the setting

Traffic originating on GREEN was set to "allowed with exceptions" and one of the enable rules for the exception was "Web" :p

Removed the web rule and all is well now!!

Thanks Ben :)
 
Personally, you'd be far better setting your lab address to something way off the physical LAN (192) so make the virtual machines 10.1.1.x or something. If you set DHCP up in the lab too, expect it to server addresses for all machines you now join to your physical network (phones, laptops, xbox, etc) too.
 
Personally, you'd be far better setting your lab address to something way off the physical LAN (192) so make the virtual machines 10.1.1.x or something. If you set DHCP up in the lab too, expect it to server addresses for all machines you now join to your physical network (phones, laptops, xbox, etc) too.

If I did use a 10.1.1.x address for the VM's what should the subnet mask be ??
 
Back
Top Bottom