How to test Windows Authentication with Applications and VMware Workstation
There have been many times where I needed to test Windows Authentication (Integrated Authentication) from inside a VM. There are a few things you can do such as:
- Join the VM to a corporate domain (good luck getting this past your IT Department)
- Setup a VPN tunnel from the VPN to the domain (again – good luck with IT)
- Create your own Domain network (IT would freak if they found out about this one which makes it my favorite)
The following instructions show how to setup a mini domain network using VMware Workstation. The same thing can be accomplished if you have access to an ESX server and possibly Hyper V.
Step 1 – Setup a domain controller
Many networks are sensitive to domain controllers so this MUST be setup using the option in VMware where the network connection is a private network (meaning it can’t get outside of the local machine). The only draw back to this is applying MS patches to your domain controller. This can be done in other ways but is outside the scope of this tutorial.
1. Create a Virtual Machine with Windows 2003 or Windows 2008.
Ram Specs (sufficient for development and testing)
Win 2003 – 512 MB
Win 2008 – 768 MB
2. Setup a single NIC and set it to private network
3. Set the NIC to a static IP address
4. Use dcpromo.exe to promote your machine to the primary domain controller in a new forest
5. Make sure you set this DC as the DNS server also
6. Setup the domain as needed (user accounts,etc)
Step 2 – Setup a client machine (this can be any other Windows OS – client and server operating systems)
Now you need a client machine to add to the domain. Use the steps below to set this up.
- Create a virtual machine
- Add a second NIC to the machine set to Host Only
- Install the operating system and patch
- Setup the 2nd NIC
- Set to a static IP address in the current range (normally 192.168.xxx.xxx)
- Set the subnet to 255.255.255.0
- Set the Gateway to the host machine’s VMware Network adapter (usually 192.168.xxx.001)
- Set the DNS server (Primary only) to the DC / DNS server created in step 1
- Now join the machine to the domain
Once steps one and two are complete you now have a client machine on your private domain network that can also access your corporate network’s resource such as database servers, other websites, etc while still concealing the domain controller from the corporate network. If you need to test Integrated Authentication with database servers then you would need to create another virtual machine with a server OS using the Step 2 instructions.
With this setup you can run a Domain Controller, Client Operating System, and a web server for less than 3 GB of ram. A host machine with 4 GB of RAM would function just fine on this (given other resources were up to par).