Re: Configuration differences for jails

From: Jeremie Le Hen (jeremie_at_le-hen.org)
Date: 04/20/05

  • Next message: Marc Olzheim: "Re: NFS client/buffer cache deadlock"
    Date: Wed, 20 Apr 2005 15:50:13 +0200
    To: ?? ?? <jas_arlerr@hotmail.com>
    
    

    Hi,

    > I am now trying to use jail in FreeBSD. I have read the jail(8) man page
    > and some
    > others documents for setting up jails. But I'm a little confused about the
    > procedure and configurations for setting up jails.
    > As known to all, jail can be used for two purposes, i.e. jailing a single
    > application or acting as a virtual host. What i want to know is the
    > concrete configuration (procedure) difference between the two types use of
    > jails. Is there a SMALLEST set
    > of configuration necessary for setting up a jail? If so, what is it?
    > Another question,
    > is there any way to detect the share of files between multiple jails
    > automatically?

    The following is based on my own experience and therefore may not be
    what other people feel.

    I run two main services on a box, Bind and Postfix, and I wanted to
    separate each other from the base system for security reason. I thought
    it was quite heavy to boot two virtual hosts as described in the jail(8)
    manpage for two daemons only, so I decided to just jail each application.
    In all cases, I strongly wanted the chosen setup to create a very few
    overhead compared to what it would be without jail.

    In the per-application case, you will have to be very careful about the
    things that will be needed by the daemon (dynamic libraries and
    configuration files as well as spool queues, mailboxes or maildirs, and
    other filesystem objects such as Unix domain sockets, named pipes, ...)
    Since I wanted this setup to be as transparent as possible, I decided
    to null mounts all needed directories from host to jail root, in order
    to be able to execute administrative commands (postconf(8), mailq(8), ...)
    from host itself. One exception is /etc : you don't want to null mount
    it into the jail as it contains very sensible informations like password
    hashes ; you will have to manually synchronize resolv.conf, localtime,
    aliases, ...

    Now with some distance, I must admit that all this gymnastic is quite
    boring. I now decided to run two virtual hosts as they are managed in
    a very natural way. These two hosts are just like two real boxes, one
    running Bind and the other one running Postfix. When I need to update
    something in the configuration, I login to the box with ssh(1). This
    take some more memory and in principle no CPU as all processes are
    sleeping most of the time.

    > BTW, what is the meaning of "IMHO"? :)
    > It appears very frequently in the mail list.

    The port games/wtf will translate acronyms for you.

    %%%
      obiwan:ports$ wtf IMHO
      IMHO: in my humble opinion
    %%%

    Regards,

    -- 
    Jeremie Le Hen
    < jeremie at le-hen dot org >< ttz at chchile dot org >
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Marc Olzheim: "Re: NFS client/buffer cache deadlock"

    Relevant Pages

    • Re: [HACKERS] semaphore usage "port based"?
      ... operation occuring within a coordinated set of server processes, ... The issue here, though, is that Marc is trying to start multiple postgres servers in different jails, and in that context the different postgres servers aren't "coordinated" in any real sense. ... We'd prefer that they didn't interact at all, but they are interacting because the SysV code isn't restricting IPC to occur only within a jail. ... This is true of any potential communication mechanism used by multi-instance applications -- be it a command line argument to specify an alternative configuration file, or a configuration file that specifies alternative ports, working directories, mail spool directories, etc. ...
      (freebsd-stable)
    • Re: /etc/rc.d/jail: losing IPs if jail_x_interface set and syntax error in jails /etc/rc?
      ... When a jail fails to start, in your case a broken rc.conf in the jail, ... interface with the following command: ... is in most cases the ipaddr. ... configuration feature in rc.d/jail at all. ...
      (freebsd-stable)
    • Re: /etc/rc.d/jail: losing IPs if jail_x_interface set and syntax error in jails /etc/rc?
      ... When a jail fails to start, in your case a broken rc.conf in the jail, ... interface with the following command: ... is in most cases the ipaddr. ... configuration feature in rc.d/jail at all. ...
      (freebsd-stable)
    • Re: Jails in -CURRENT
      ... > I don't really like the sound of this. ... In my case I need many options and configuration lines for each ... jail and currently i have about 15 jails on one host. ... What about devfs rulesets... ...
      (freebsd-current)
    • 4.10, Jails, apache and FIN_WAIT_1
      ... Due to unreliable hardware, I transferred my ... webserver from it's own machine, running FreeBSD 5.2, to a jail on ... appropriate mount point inside the jail. ... configuration of which has not changed bar the http port-forwarding IP ...
      (freebsd-questions)