Jorge's Quest For Knowledge!

All You Need To Know About Identity And Security On-Premises And In The Cloud. It's Just Like An Addiction, The More You Have, The More You Want To Have!

(2009-01-08) Using A Simple Router/Firewall In Your VM Environment

Posted by Jorge on 2009-01-08


You have a set of VMs in their own Virtual Network. Those VMs can communicate with each and do not have access to the internet. Imagine you need access to the Internet because you want to update a VM, or you want to activate it, or whatever. One of the easiest options without screwing up the IP config of the VMs is to do the following:

  1. Download the latest beta version of m0n0wall (FreeBSD router/firewall which is great to be used in VM environments) http://m0n0.ch/wall/beta.php (this version also allows to put the stuff on a VM disk and keep it there without losing settings after rebooting that router VM)
  2. Create a new VM and boot it up from the ISO (before doing that assign it two NICS, one for the VM LAN and the other bridged with the host machine’s NIC
  3. After booting it up….
    1. Assign NICs to it from the menu by pressing 1. Assign em0 to LAN and em1 to WAN
    2. Assign it an address in the same LAN as your VMs (for example if your VM has 192.168.1.1, give the LAN NIC on m0n0wall 192.168.1.254)
    3. Adjust the IP config of the VM (just the gateway address!) assign the LAN address of the m0n0wall as gateway of the VM
    4. Check DNS of your VM and make sure the root hints are specified and the server DOES NOT host a root zone (.). If it does, remove it and restart DNS and check the DNS root hints are there (you should get a message stating if you want to put it back)
  4. Then in IE goto the LAN address of m0n0wall. Logon as ‘admin’ with pwd ‘mono’. Reconfigure the WAN interface with an address on the same network as the host, configure it with the same gateway as your host
  5. Now you should be able to access the internet

This works like a charm for me! I use VMWare Workstation extensively and it works great. It should also work for Virtual PC, Virtual Server and Hyper-V.

More information on configuring m0n0wall can be found here.

 

Cheers,
Jorge
———————————————————————————————
* This posting is provided "AS IS" with no warranties and confers no rights!
* Always evaluate/test yourself before using/implementing this!
* DISCLAIMER:
https://jorgequestforknowledge.wordpress.com/disclaimer/
———————————————————————————————
############### Jorge’s Quest For Knowledge #############
#########
http://JorgeQuestForKnowledge.wordpress.com/ ########
———————————————————————————————

One Response to “(2009-01-08) Using A Simple Router/Firewall In Your VM Environment”

  1. tomek said

    For similiar pourpose I use XORP (http://www.xorp.org/) – I use it mostly for simulating WAN environment within my virtual network.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: