OpenVZ Forum


Home » General » Support » OpenVZ veth and few ips in CT
OpenVZ veth and few ips in CT [message #51945] Thu, 26 March 2015 11:15
bacarrdy is currently offline  bacarrdy
Messages: 4
Registered: March 2015
Location: Lithuania
Junior Member
From: *static.zebra.lt
Hello,

i`m trying to add few public ips inside CT, and i can get working only one of them, can you check or i do something wrong?

vzctl create CTID --ostemplate debian-7.0-x86_64 --config PLAN
vzctl set CTID --hostname HOSTNAME --save
vzctl set CTID --nameserver NAMESERVER --save
vzctl set CTID --features bridge:on --save
vzctl set CTID --netif_add eth0 --save
vzctl set CTID --netfilter full --save
echo 1 > /proc/sys/net/ipv4/conf/vethCTID.0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/vethCTID.0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
vzctl exec CTID /sbin/ifconfig eth0 0
vzctl exec CTID /sbin/ip addr add IP dev eth0
vzctl exec CTID /sbin/ip route add default dev eth0
ip route add IP dev vethCTID.0


one ip works fine, but i try to add second one the internet from it wont work

vzctl set CTID --netif_add eth1 --save
echo 1 > /proc/sys/net/ipv4/conf/vethCTID.1/forwarding
echo 1 > /proc/sys/net/ipv4/conf/vethCTID.1/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
vzctl exec CTID /sbin/ifconfig eth1 0
vzctl exec CTID /sbin/ip addr add IP2 dev eth1
vzctl exec CTID /sbin/ip route add default dev eth1 metric 2
ip route add IP2 dev vethCTID.1


ping -I eth0 somedomain.com works
ping -I eth1 somedomain.com wont work

what ì`m doing wrong?
Previous Topic: Debian - Openvz is not reading from /vz partition
Next Topic: iptables: No chain/target/match by that name while setting IP Rotation
Goto Forum:
  


Current Time: Thu Jul 02 09:55:43 GMT 2020