Exposing a virtual node as a public machine [message #29344] |
Fri, 11 April 2008 02:57 |
simeshev
Messages: 5 Registered: April 2008
|
Junior Member |
|
|
Hi,
We have just set up our first virtual node. Now we would like to expose the virtual node to the Internet as a first-class machine. It should have its own public IP address and should not communicate with the HN in any way.
The HN is CentOS 5, it has eth0 and its public IP address let say 111.111.111.111. The virtual node should be accessible at the address let say 222.222.222.222.
I guess it's a pretty common use case but, the docs are not very clear on how to do it. Any ideas?
TIA.
Slava
[Updated on: Fri, 11 April 2008 04:57] Report message to a moderator
|
|
|
|
|
|
|
Re: Exposing a virtual node as a public machine [message #29356 is a reply to message #29344] |
Fri, 11 April 2008 08:20 |
|
This is done pretty much the same as assigning a second IP address to the system. In this case, however, you should assign that IP to a container, not to the host system (using vzctl set CTID --ipadd x.x.x.x --save). Usually, this is all what's required. Surely this x.x.x.x IP address should be routable to your box (i.e. you can not assign arbitrary addresses -- use only those dedicated to you by your hosting/colocation/Internet provider).
Note that
1. Host system acts as a router for container, so traffic goes through the host system anyway.
2. If you don't want host system to be used as a router, you can use it as a bridge. See http://wiki.openvz.org/Veth for details.
3. If you don't want container's traffic to go through host system, you can assign a real network card/interface to that container, as described in this thread by vaverin.
Finally, see http://wiki.openvz.org/Category:Networking
Kir Kolyshkin
[Updated on: Fri, 11 April 2008 08:20] Report message to a moderator
|
|
|
|
|