Can I make VEs share an IP where each VE services different ports?
Hi, what about this ways (unfortunately I haven't tried them ) 1. Using venet it's impossible to assign the same IP addresses to your VEs. But your can assign IP address you want to share to your HN, assign any different IP addresses to your VEs and then for example via iptables distribute the traffic. 2. Using veth try to assign the IP address you want to share to your VEs and then set appropriate iptables rules on the HN to sort the traffic.
Could I do a fake net 10.0.0.2 for the IP than then use iptables in the HE and redirect the traffic for a particular port to 10.0.0.2?
Hi, that I had in mind. (using fake IP for your VEs). P.S. don't forget to set appropriate routes to your VEs.
Would you have an example of how to do this? Lets say the HE had an IP of 1.2.3.4 and the VE had IP of 10.0.0.2 and I wanted to service TCP port 80. What whould I do?
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.
Can you tell me how you solve this problem. I looked every where and still cannot find how to make services available from the internet to a VE