LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Vmware webserver issue (https://www.linuxquestions.org/questions/linux-software-2/vmware-webserver-issue-389223/)

king111 12-04-2005 03:38 PM

Vmware webserver issue
 
I'm attempting to configure a VMware webserver, but it's not going so well. In fact, it's not going at all. I'm a bit confused about how to set it up to work with iptables for outside access.

Here is my network configuration:

router ---> main box/vmware ---> other machines

Everything goes through my "main" box. The other machines are only meant to be accessible on the LAN.

I set VMWare to use Bridged networking, and it was assigned 192.168.0.102 on the LAN. So I go into my router config and forward http to 192.168.0.102.

Here's comes my problem: I can't access it from outside the LAN. My router doesn't appear to be forwarding it properly.

Code:

iptables -t nat -A PREROUTING --dst 192.168.0.101 --dport 80 -j DNAT --to 192.168.0.102:80
iptables -A FORWARD --dport 80 -j ACCEPT

I assume that this makes all http traffic seen by 192.168.0.102, the main box, to be forwarded to the vmware server running atop 192.168.0.101. I figured wrong.

Just for kicks, I tried setting up an httpd listening on port 80 on my main box and not vmware. When I tried accessing it from outside the network, it functioned perfectly. So I assume that the above iptables rules are incorrect somehow.

king111 12-04-2005 05:51 PM

Please respond?


All times are GMT -5. The time now is 11:28 PM.