#!/bin/sh # This route is required to have outgoing packets coming from # the private IP instead of the first IP assigned to the VZ # This allow packets from 10.1.30.0/24 to be normally routed # by the host if echo $IF_ADDRESS | grep -q "^10\.1\.30\." ; then ip route add 10.1.30.0/24 dev venet0 src $IF_ADDRESS fi