OpenVZ Forum


Home » General » Support » *SOLVED* HN connected to PRIVATE and PUBLIC networks at once
*SOLVED* HN connected to PRIVATE and PUBLIC networks at once [message #11668] Mon, 02 April 2007 10:06 Go to next message
slavco is currently offline  slavco
Messages: 1
Registered: April 2007
Junior Member
Hi all,

I have the folowing situation (see attached picture):
HN has two NICs and is connected to public internet and also to private networks (with private ip addresses). I have some VEs that needs to have 2 IPs; one private ip address and one public ip address.

Example: VE acting as DHCP server for both clients on private networks and on public network - at the same time.

My HN /etc/network/interfaces look like this:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.1.1.100
netmask 255.255.255.0
up route add -net 10.0.0.0 netmask 255.0.0.0 gateway 10.1.1.2
up route add -net 172.16.0.0 netmask 255.240.0.0 gateway 10.1.1.2
up route add -net 192.168.0.0 netmask 255.255.0.0 gateway 10.1.1.2

auto eth1
#iface eth1 inet dhcp
iface eth1 inet static
address 85.248.15.34
netmask 255.255.255.240
gateway 85.248.15.33

When I set eg. in VE101 conf. IP_ADDRESS="85.248.15.35 10.1.1.101", packets eggressing the VE101 has all the SRCIP 85.248.15.35. So, on public network is everything ok, but not functional on private network (when the remote machine on private network relpies the packet, it is routed back through my NAT box which drops the packets).

When I set IP_ADDRESS="10.1.1.101 85.248.15.35" the SRCIP of all eggressing packets will be 10.1.1.101, so private segment can communicate ok, but this ip is unroutable on the public network segment.

Is there any solution to this?
Thanks for help.

Slavco

index.php?t=getfile&id=326&private=0

[Updated on: Wed, 04 April 2007 12:22] by Moderator

Report message to a moderator

Re: HN connected to PRIVATE and PUBLIC networks at once [message #11678 is a reply to message #11668] Mon, 02 April 2007 14:37 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
In order to use VE as dhcp you should use veth interface, but not venet!

HTH,
Vasily.
Previous Topic: *SOLVED* Can vzrpm4.3 or vzrpm 4.4 be build for IA64?
Next Topic: *CLOSED* git.openvz.org: git service unavailable
Goto Forum:
  


Current Time: Wed Jul 10 22:16:07 GMT 2024

Total time taken to generate the page: 0.02588 seconds