From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Wed 07 Aug 2002 - 00:16:02 BST
On Tue, Aug 06, 2002 at 02:15:20PM -0700, Ian Douglas wrote:
> > > On the main server, if I run 'setup' (RedHat 7.3), I see the typcial
> > > services, httpd, named, sendmail, etc., and then v_httpd,
> > v_sendmail. On the
> > > MAIN server, should I UN-select the httpd/sendmail services and
> > only run the
> > > v_ services?
> >
> > The v_ services, does, as far as i understand,
> > the same as the other,
> > except it starts the service inside a vserver.
> > You could do a vserver enter.
hmm, thats not exactly what they do ...
lets take a look at v_httpd:
-----snip----
# description: Wrapper to start httpd bound to a single IP
IP=eth0
if [ -f /etc/vservices/httpd.conf ] ; then
. /etc/vservices/httpd.conf
fi
exec /usr/sbin/chbind --ip $IP /etc/init.d/httpd $*
-----snip-----
the chbind tool binds (reduces) the ip address(es) to
the given one --ip <ip1> and calls the _original_
script to start their service ...
> So the main server should just run "httpd" and
> the others shoudl run "v_httpd" ?
so short answer to your question:
- call v_xxx in your main server to limit
the services to the given ip(s)
- call xxx in your virtual servers because
the chbind is already in effect
because I often have more than one interface
ative for the main server, I modified the
v_xxx scripts to use the new features of
binding to more than one ip address ...
for example for the v_sshd script ...
-----snip-----
IP="eth0 eth1"
IPC=`for n in $IP; do echo "--ip $n"; done`
if [ -f /etc/vservices/sshd.conf ] ; then
. /etc/vservices/sshd.conf
fi
exec /usr/sbin/chbind $IPC /etc/init.d/sshd $*
-----snip-----
> > Give all your vservers a different name, and
> > show that name in the prompt.
> Yeah, already figured that one out after removing
> all those RPM files...
> /sigh
good idea *G*
best,
Herbert