OpenVZ Forum


Home » General » Support » VEs sharing an IP address?
Re: VEs sharing an IP address? [message #31565 is a reply to message #31563] Thu, 03 July 2008 15:13 Go to previous messageGo to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

I think there is a little misunderstanding between us.
Quote:


HE had an IP of 1.2.3.4 and the VE had IP of 10.0.0.2


this way should help you http://wiki.openvz.org/Using_NAT_for_container_with_private_ IPs#How_to_provide_access_from_Internet_to_a_container

I mean something different
Let's assume we have a HN and two VEs (VE1 and VE2).
Let's assume we have an IP address - IP1.
We have some services inside VE1 and inside VE2 that are using different ports.
We want to use IP1 for both of our VEs and sort the traffic using ports numbers.

1. we assign IP1 to HN (for example with alias to net interface or using additional net card).
Then we assign fake IPs (IP_fake_1, IP_fake_2) to VEs. Put appropriate routes to our VEs.
Then we set appropriate iptables rules on the HN to sort traffic using destination port.

2. Using veth. We assign IP1 to our VEs. And then we set appropriate iptables rules on the HN to sort traffic using destination port.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Network Interfaces Configuration
Next Topic: Moving VEs with IP-Addresses
Goto Forum:
  


Current Time: Sun Sep 08 09:15:42 GMT 2024

Total time taken to generate the page: 0.05124 seconds