OpenVZ Forum


Home » General » Support » link external ip to a VM
link external ip to a VM [message #25677] Mon, 07 January 2008 08:07 Go to next message
Thomasd is currently offline  Thomasd
Messages: 39
Registered: December 2007
Member
in this case, I care only about one port (80).

If I set an outside IP to a VM, apache will not reply:

case 1:
VM is at 10.0.0.1

iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to 10.0.0.1:80

All connections to port 80 will be sent to the VM, so it works fine.

case 2:
VM is set to use an outside IP (different than the HW node).
Apache does not reply to anything. It is set to listen to the outside IP.



I have three outside IPs, they're bound to eth0, eth0:1 and eth0:2; should I unbind the one I am interested in for the VM so that it doesn't get listened to by the HW node? I am quite confused about all this and can't find much on google about it :S



Re: link external ip to a VM [message #25681 is a reply to message #25677] Mon, 07 January 2008 09:13 Go to previous message
Thomasd is currently offline  Thomasd
Messages: 39
Registered: December 2007
Member
actually I just tried to remove one IP and disabled eth0:2 and assigned it to the VM; it doesn't work
Previous Topic: *SOLVED* unloading iptables modules failed
Next Topic: growisofs inside a VE
Goto Forum:
  


Current Time: Tue Nov 05 15:51:27 GMT 2024

Total time taken to generate the page: 0.04148 seconds