VMWare Server and NAT.

Wed 31 October 2007

Filed under OS

Tags Cool Obvious

I setup VMWare Server on Gentoo the other day. It was pretty much easy. After install, cleanup all the .vmware folders in various home directories. Assign users with priv's to the 'vmware' group.

User Setup

gpasswd -a vmadmin vmware

Run the vmware-config.pl - Note the network numbers.

Network Setup

e.g.

  • Host-only: 172.16.42.0/24

  • NAT: 10.51.1.0/24

Vmware will NAT on the 10.51.1.0 network. Linux will have something like:

  • vmnet0 172.16.42.1

  • vmnet8 10.51.1.1

Next, fixup /etc/xinetd.d/vmware-authd

--- vmware-authd~       2007-10-13 13:26:18.830128814 -0700
+++ vmware-authd        2007-10-13 13:36:42.833942428 -0700
@@ -10,5 +10,5 @@
     user            = root
     server          = /opt/vmware/server/sbin/vmware-authd
     type            = unlisted
-    only_from      =
+    only_from      = 0.0.0.0/0
}

Firewall Setup

Once you get a guest running, you discover that DHCP on the NAT network provides a gateway of 10.51.1.2. That is great for VMWare-based NAT setup. See /etc/vmware/vmnetX/nat/nat.conf to tweak the NAT settings.

I wanted to use shorewall, complete with NAT and port forwarding. I installed/configured shorewall. After that, I setup the NAT and port-forwarding rules.

Finally, I connected to the Guest OSs which I wanted to expose, assigned static IPs and set thier default gateway to .1 instead of .2. This effectively removed them from the control of VMware nat. And that was is awesome.


Comments


Up To Something © Joshua M Schmidlkofer Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More