Hide VMWare Virtual Network Interfaces from Windows Firewall and Network and Sharing Center

VMWare Workstation creates two virtual network adapters by default. One is the host-only network and the other is for NAT routing. You can add several more to suit your needs for more complex scenarios.

The problem is that these networks cause Windows 7 to think it is attached to a public “unidentified network” which has the side-effect of disabling network and printer sharing. You will experience the same problem with Windows 7 Virtual PC if you create virtual loopback device adapters and the same problem occurs with VirtualBox.

The solution is to mark the virtual network adapters as *NdisDeviceType=1 in the registry:

*NdisDeviceType

The type of the device. The default value is zero, which indicates a standard networking device that connects to a network. Set *NdisDeviceType to NDIS_DEVICE_TYPE_ENDPOINT (1) if this device is an endpoint device and is not a true network interface that connects to a network. For example, you must specify NDIS_DEVICE_TYPE_ENDPOINT for devices such as smart phones that use a networking infrastructure to communicate to the local computer system but do not provide connectivity to an external network.

Note  Windows Vista automatically identifies and monitors the networks a computer connects to. If the NDIS_DEVICE_TYPE_ENDPOINT flag is set, the device is an endpoint device and is not a connection to a true external network. Consequently, Windows ignores the endpoint device when it identifies networks. The Network Awareness APIs indicate that the device does not connect the computer to a network. For end users in this situation, the Network and Sharing Center and the network icon in the notification area do not show the NDIS endpoint device as connected. However, the connection is shown in the Network Connections Folder.

As far as I’m concerned this is just a bug in both VirtualBox and VMware Workstation. They should be marking their virtual network devices as *NdisDeviceType=1 for compatibility with NT 6.x –based operating systems.

Until they do that, I cobbled together a little powershell script to find any NICs created by VMWare and mark them as virtual. The setting takes affect after a reboot.

# tell windows that VMWare Network Adapters
# is not a true network interface that connects to a network
# see http://msdn.microsoft.com/en-us/library/ff557037(VS.85).aspx
pushd
echo "Marking VMWare Virtual Ethernet Adapters as virtual.`r`n"
cd 'HKLM:\system\CurrentControlSet\control\class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
ls ???? | where { ($_ | get-itemproperty).DriverDesc `
-like 'VMware Virtual Ethernet Adapter *' } | `
% { $_ | new-itemproperty -name '*NdisDeviceType' -PropertyType dword -value 1 } | `
% { "`"" + ($_ | get-itemproperty).DriverDesc + "`" -> *NdisDeviceType=1" } 
echo "`r`nReboot to apply changes."
popd

Advertisements

SOHO Network To Go

Years ago at a former employer, I designed a product called the “Rapid Deployment Network” (RDN). It was basically a robust back office system pre-configured and packed into a small-ish cabinet so that it could be shipped overseas and plugged in. Bam. The RDN business never took off because it didn’t fit will with the procurement model of the intended consumer but I find myself revisiting the problem for my relocation to Ghana.

mini-server

I want to take a fully functional SOHO office network with me that I can plug into an Internet connection and go. However, I am very cognizant of my weigh allowances for air freight so I want to pack as much as I can into as little weight as I can. And I’d like to keep the overall wattage down.

My server is based on a Mac Mini running Windows Server 2008 R2.

net-gear

I’m also taking along some network hardware that runs cool without fans:

  • Cisco 851 router (firewall and VPN feature set) –> max 26 Watts
  • Cisco WAP4410 Wireless N access point –> max 10.1 Watts
  • HP Procurve 1810G 8-port managed gigabit switch –> max 15 Watts

That puts my maximum power consumption of the core network infrastructure at 201.1 watts but most of the time it will be idle at maybe 30 to 50 Watts.power

In addition I have an APC Smart-UPS 750 uninterruptible power supply. It is basically a 500 Watt, 750 Volt-Amp battery and inverter appliance that connects to the server via USB. This allows the server to safely shut itself down before the UPS runs out of power. Along with the UPS, I have a 500 Watt step-down transformer and voltage stabilizer to smooth out power going in.

I’m pretty satisfied with what I have cobbled together. The are two main issues which are essentially logistical.

  1. The UPS and the voltage stabilizer are fairly big and heavy. 31 pounds for the UPS which contains actual lead. The transformer/stabilizer has big copper coils inside it an weighs in at 14 pounds.
  2. Should the hard disk inside of the Mac Mini fail, it is a real bitch to replace it. You need a sand paper, a putty knife, spudger, tiny phillips screw driver and a steady hand.
%d bloggers like this: