VMWare Server and NAT.

Posted by Joshua Schmidlkofer Wed, 31 Oct 2007 19:56:00 GMT

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

Leave a comment

Comments