[Vserver] advanced routing per vps

2006-09-15 Thread Rik Bobbaers
heya all, since yesterday , i found it necessary to do my routing per vserver. so what did i do: (i put everything in /usr/local btw ;)) gandalf:~# cat /usr/local/etc/vservers/.defaults/scripts/pre-start #!/bin/sh HOSTNAME=$2 IF=`cat /usr/local/etc/vservers/${HOSTNAME}/interfaces/0/dev` IP=`ca

Re: [Vserver] advanced routing per vps

2006-09-17 Thread Herbert Poetzl
On Fri, Sep 15, 2006 at 11:35:26AM +0200, Rik Bobbaers wrote: > heya all, > > since yesterday , i found it necessary to do my routing per vserver. > so what did i do: (i put everything in /usr/local btw ;)) > > gandalf:~# cat /usr/local/etc/vservers/.defaults/scripts/pre-start > #!/bin/sh > > HO

Re: [Vserver] advanced routing per vps

2006-09-18 Thread Rik Bobbaers
Herbert Poetzl wrote: you do not need an ip address to bring an interface up :) ifconfig eth2 up ifconfig eth2 down as said... if i restart interfaces, i don't want "weird old" ip addresses on the interface, so i put 0.0.0.0 on it ;) not really sure if that makes sense, but... don't ev

Re: [Vserver] advanced routing per vps

2006-09-19 Thread Herbert Poetzl
On Mon, Sep 18, 2006 at 04:02:27PM +0200, Rik Bobbaers wrote: > Herbert Poetzl wrote: > > >you do not need an ip address to bring an interface up :) > > > > ifconfig eth2 up > > ifconfig eth2 down > > as said... if i restart interfaces, i don't want "weird old" ip > addresses on the interface,

Re: [Vserver] advanced routing per vps

2006-09-20 Thread Rik Bobbaers
Herbert Poetzl wrote: routes and addresses are only loosely coupled, and the existance of one doesn't imply the other not really... i can do a: ip route add $NETWORK dev $IF table but, i can't add a gateway for that network if there is no ip defined on that $IF so, how would i go around th

Re: [Vserver] advanced routing per vps

2006-09-21 Thread Herbert Poetzl
On Wed, Sep 20, 2006 at 03:30:08PM +0200, Rik Bobbaers wrote: > Herbert Poetzl wrote: > >routes and addresses are only loosely coupled, > >and the existance of one doesn't imply the other > > not really... i can do a: > ip route add $NETWORK dev $IF table > > but, i can't add a gateway for that