OKay here is the set up:
I have a CENTOS 64bit running, with 1 guest OS (WinXP) in a VMWare Server. I have tried the following: I have 6 public IP's attached to my 1 Ethernet card in the CENTOS host.
Try 1:
The Guest OS is set to use "Bridged" Networking. This allows full use of the internet, in both directions. Not exactly optimal, but it does work. I can reach the Guest via RD, which is a requirement for this client. The guest OS is mainly assigned one of the 6 public IP's (x.x.x.118). The problem with this setup is the Guest OS can not reach the host. For example the host has a mail server on it, and when the Guest tries to reach the host, it times out.
Try 2:
The Guest OS is set up to use "NAT" and gets 192.168.100.128 as its IP via DHCP inside of VMWare. The nat config file for VMWare is set to open port 3389 (RD port). Guest OS can reach the host with out any problem, and can reach the internet with out any problem, however I can not RD in to the Guest OS.
I prefer setup number 2 for all the obvious reasons, but I just can not get my IPTables rules to work. This is what I thought should work, but does not:
Code:
iptables -t nat -I PREROUTING -d x.x.x.118 -j DNAT --to-destination=192.168.100.128
iptables -t nat -I POSTROUTING -s 192.168.100.128 -j SNAT --to-source=x.x.x.118
I realize that would have done all traffic, and defeated the benefits of NAT,but since forwarding only 3389 was not working I tried forwarding everything.
Any suggestions?