Help with "ezjail-admin create" command

Peter Boosten peter at
Wed Jul 14 20:02:54 UTC 2010

On 14 jul 2010, at 21:49, Ed Flecko wrote:

> Hi folks,
> I've found a website ( )
> with a tutorial that steps me through most if what I'm trying to
> set-up; I'm trying to use ezjail to set up the latest version of
> Apache with my website. I've carefully followed the steps, and the
> only step that I've found that seems to be wrong is the author's
> reference to "default" which doesn't seem to exist; it's actually
> "example" so I've changed my commands accordingly.
> I'm confused about the "ezjail-admin create" command.
> When I installed FreeBSD, I set up a partition called "www", because I
> thought it might be easier for me to backup all of my web sites, etc.,
> and it's easier for me to remember where I installed Apache.
> I've modified my ezjail.conf file and the ezjail_jaildir line to read:
> ezjail_jaildir=/www/jails
> When I issue this command:
> ezjail-admin create -f example apache
> I get this error:
> find: /www/jails/apache/pkg/: no such file or directory
> Note: Shell scripts for flavour example installed, flavourizing on
> jails first startup.

I think you're better off creating a fresh jail, and install apache via the ports collection. for the templates to work you need to specify all dependencies by hand.

> It also throws an error about "some services already seem to be
> listening on IP"
> 1.) What did I screw up? This isn't normal, is it?

This is a normal thing. By default services on FreeBSD listen on all interfaces, and since jails use an alias on an existing interface, it'll listen on that as well. You will need to change the configurations of the services on the host for at least all services you will run on the jail as well (so if your host runs apache, you'll need to reconfigure apache to listen only on one IP address, or have apache in the jail listen on another port than 80). Same goes for sshd and other services.

> 2.) When using the "ezjail-admin create" command, the IP address that
> I'm passing is supposed to be the IP address of the HOST machine
> (because it has the "basejail", right?), isn't it?

No, the IP address the jail will have (but you have to create an alias on the host to that IP address)

> 3.) When I type:  find / -name apache
> I get:
> /usr/local/etc/ezjail/apache and /www/jails/apache
> Does the ezjail program create TWO instances of what will be my
> "jailed" Apache? Why does it do that? Did I goof something else up, or
> is that "normal"?

Those are probably symlinks...

Peter Boosten

More information about the freebsd-questions mailing list