LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Dedicated Server, two IP's, VMware, can I have two Port 80 forwards? (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/dedicated-server-two-ips-vmware-can-i-have-two-port-80-forwards-797871/)

Martin_H 03-25-2010 03:34 PM

Dedicated Server, two IP's, VMware, can I have two Port 80 forwards?
 
I have a dedicated server running CentOS with two IP addresses on which I want to run an Ubuntu VM and a W2003 VM, my intention is to run them off the separate IP's so that I can have Port 80 going to either of them according to the IP source.

I thought this should be straightforward but it doesn't seem to be. What I have set up at the moment is:
  1. ethh0 linked to nnn.nnn.nnn.101 and eth0:1 linked to nnn.nnn.nnn.102, my two IP addresses.

  2. the Ubuntu VM set to NAT1 which uses vmnet8 for which I selected eth0 in the configuration and W2003 set to NAT2 which uses vmnet2 for which I selected eth0 :1 in the configuration. (Side question, how do I check that this is how they are actually set up?)

  3. /etc/vmware/vmnet8/nat/nat.conf is set to forward port 80 to 192.168.58.128:80 and /etc/vmware/vmnet2/nat/nat.conf is set to forward port 80 to 80 = 172.16.105.128:80

Which ever IP address, I use, however, I end up on 172.16.105.128

Googling suggested that this might be ue to IP Packet Leakage but recommended solution is to set /proc/sys/net/ipv4/ip_forward to 0 and is already set to that.

Am I missing something here or am I going about this entirely the wrong way, or is what I'm trying to do simply not possible?

acid_kewpie 03-25-2010 05:38 PM

if you wnat them separate, why are you doing any nat?? just bridge them and they'll appear on the netwokr like any other physical device.

Martin_H 03-26-2010 01:50 AM

I can't figure out how to get Bridged working, Chris.

My two public IP's are 190.xxx.xxx.101 and 190.xxx.xxx.102 and both have Gateway 190.xxx.xxx.1

Using DHCP doesn't give the VM's Internet access either in or out; if I set the IP's manually using private addresses e.g. 192.168.1.101/102 then they cannot access the 190.xxx.xxx.1 Gateway.

acid_kewpie 03-26-2010 06:11 AM

you get bridging by just changing the VMware nic from nat to bridge, nothing at all to do on the server VM's themsevles

Martin_H 03-26-2010 06:29 AM

I get no Internet access into or out from the VM's when I do that :(

acid_kewpie 03-26-2010 06:31 AM

well you'll need to give them IP addresses in the same subnet as the outside of the host machine, through DHCP or statically.

Martin_H 03-26-2010 06:54 AM

That's what I was trying to explain above. The host machine is a dedicated server so the subnet is a public one in which I have two slots so to speak.


All times are GMT -5. The time now is 08:49 PM.