OpenVZ Forum


Home » General » Support » Network setup how to do it. (HOST debian CT centos)
Network setup how to do it. [message #37080] Tue, 18 August 2009 03:15 Go to next message
michaelvv is currently offline  michaelvv
Messages: 7
Registered: October 2008
Junior Member

Hi ...

I'm told to make this setup would it be possible.... I want 2 openvz containers how should i do the setup...
Due to my limited network experience in this special case please guide me with a

setup for :

/etc/network/interfaces on Host
and how should i configure the containers bridge or nat...

Want i want to do.

The containers should be able to ping the HOST and each other and should be able to connect to the gateway.

Is it possible ???

The 192.168.1 range is a WAN ip of course...


Host 'Debian Proxmox'

ip : 192.168.1.106
subnet : 255.255.255.0
gateway : 192.168.1.105

Container 1 VEID [101] 'Centos 5.2'

ip : 192.168.1.146
Default Gateway : 192.168.1.145
Subnet Mask : 255.255.255.252

Container 2 VEID [102] 'Centos 5.2'

ip : 192.168.1.150
Default Gateway : 192.168.1.149
Subnet Mask : 255.255.255.252

Thanks.

/Michael

[Updated on: Tue, 18 August 2009 05:06]

Report message to a moderator

Re: Network setup how to do it. [message #37124 is a reply to message #37080] Wed, 19 August 2009 14:42 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

why do you want to use different gateways for different VEs?
Is it a vital request?
In this case I'd recommend you to use veth in bridge mode.

http://wiki.openvz.org/Veth

http://wiki.openvz.org/Veth#Virtual_Ethernet_devices_can_be_ joined_in_one_bridge
Re: Network setup how to do it. [message #37133 is a reply to message #37124] Thu, 20 August 2009 12:00 Go to previous messageGo to next message
michaelvv is currently offline  michaelvv
Messages: 7
Registered: October 2008
Junior Member
Hi Maratrus...

Yes it's a requirement from the HOSTING company..

The Firm where i work has a customer who had
severe DDOS and they are moving behind blacklotus.net..

They have this requirement and they do not support OPENVZ
so we are pretty lost...

The box is a ProxMOX server and yesterday we where so desperate
that we had an offer 500$ for a working setup , but no
useful surgessions....

I have read the WIKI's and things seems to work i just have
a big problem now....

When i try to connect from INTERNET to the CT i hit the HOST.

Do you have a solution to this ????

A little info...

/Michael

The Proxmox PVE is debian based ,i know you know Smile..
I give you 3 configurations files here :

/etc/network/interfaces [HOST]

auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.106
netmask 255.255.255.0
gateway 192.168.1.216
bridge_ports eth0
bridge_stp off
bridge_fd 0
up route add -host 192.168.1.146 dev vmbr0
up route add -host 192.168.1.166 dev vmbr0

/etc/rc.d/rc.local [VE 101]

ifconfig eth0 192.168.1.146/30
ip route add 192.168.1.106 dev eth0
ip route add 192.168.1.166 dev eth0
ip route add 192.168.1.216 dev eth0
route add default gateway 192.168.1.216










Re: Network setup how to do it. [message #37261 is a reply to message #37133] Sun, 30 August 2009 08:16 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi Michael,

as far as I understand, the first problem was solved and you coped with general network configuration i.e. you configured everything you wanted to do. So, the second problem appeared,
Quote:

When i try to connect from INTERNET to the CT i hit the HOST.


It's a little bit strange request from my point of view because each of your VE has a PRIVATE ip addresses so no wonder they are invisible from outside. Assume that you have a router which has a few computers behind it (this configuration similar to HN<--->VEs). A router is reachable from outside but the internal computers are not. It's a common situation.
If you want to make a container to be visible from outside you can
- assign it a public ip address
- make a particular port be visible from Internet.
The way is described http://wiki.openvz.org/Nat#How_to_provide_access_from_Intern et_to_a_container

Previous Topic: Strange problem - machine "zombifying"
Next Topic: Access to ifconfig denied from container (OpenVPN internet routing)
Goto Forum:
  


Current Time: Sun May 12 20:29:34 GMT 2024

Total time taken to generate the page: 0.01452 seconds