| 
		
			| Access to eth0(private network) and eth1(public network) from container [message #43630] | Mon, 03 October 2011 13:45  |  
			| 
				
				
					|  AfterDarkMike Messages: 2
 Registered: October 2011
 | Junior Member |  |  |  
	| Hi, 
 First some general info.
 
 I use SoftLayer as a server provider, who uses private dns resolvers (10.x.x.11, 10.x.x.12) and also use eth0 as the private network and eth1 as public.
 
 I can't seem to set up my containers to access the private network and ended up using 8.8.8.8 as a dns resolver.
 
 I don't know if any of this is right as it's my first shot at OpenVZ but here's how I ended up getting my first container live:
 
 vzctl create 102 --ostemplate  ubuntu-8.04.2-i386-minimal --config unlimited
 vzctl set 102 --onboot yes --save
 vzctl set 102 --ipadd 174.x.x.106 --save
 vzctl set 102 --nameserver 8.8.8.8 --nameserver 8.8.8.8 --save
 vzctl set 102 --netif_add eth0,00:0C:29:45:CF:4F,veth102.0,00:0C:29:4C:B2:A2 --save
 vzctl set 102 --netif_add eth1,00:0C:29:78:C5:B8,veth102.1,00:0C:29:08:33:68 --save
 vzctl set 102 --hostname corp.domain.com --save
 vzctl start 102
 ifconfig veth102.0 0
 ifconfig veth102.1 0
 echo 1 > /proc/sys/net/ipv4/conf/veth102.0/forwarding
 echo 1 > /proc/sys/net/ipv4/conf/veth102.1/forwarding
 echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
 echo 1 > /proc/sys/net/ipv4/conf/eth1/forwarding
 echo 1 > /proc/sys/net/ipv4/conf/veth102.0/proxy_arp
 echo 1 > /proc/sys/net/ipv4/conf/veth102.1/proxy_arp
 echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
 echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
 
 Container Node is live accepting traffic on 74.x.x.106
 
 Any help would be appreciated.
 
 What I want is to be able to connect to the public/private network, use SL's 10x resolvers, have a public facing IP and a private one for each node.
 
 Thanks
 |  
	|  |  | 
	|  |