Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2007 11:29:07 +0000 (UTC)
From:      Duane Hill <d.hill@yournetplus.com>
To:        Roberto Pereyra <pereyra.roberto@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: jail question
Message-ID:  <20070426112307.U4140@duane.dbq.yournetplus.com>
In-Reply-To: <f05666f00704260352k6526bbegf80c34fcf5fc7269@mail.gmail.com>
References:  <f05666f00704260352k6526bbegf80c34fcf5fc7269@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 26 Apr 2007, Roberto Pereyra wrote:

> hi
>
> I running fbsd 6.2 and I would like to my first jail setup, but I have
> this error when I start the jail (jail0):
>
> srv1# /etc/rc.d/jail start
> Configuring jails:.
> Starting jails:ifconfig: interface alias does not exist
> jail0.
> srv1#
>
>
> What I do wrong ?
>
> Thanks in advance.
>
> roberto
>
> This is my /etc/rc.conf
>
> # -- sysinstall generated deltas -- # Mon Apr 23 09:32:04 2007
> # Created: Mon Apr 23 09:32:04 2007
> # Enable network daemons for user convenience.
> # Please make all changes to this file, not to /etc/defaults/rc.conf.
> # This file now contains just the overrides from /etc/defaults/rc.conf.
> defaultrouter="192.168.0.2"
> hostname="srv1.gualeguaychu.gov.ar"
> ifconfig_sk0="inet 192.168.0.1  netmask 255.255.0.0"
> keymap="spanish.iso.acc"
> linux_enable="YES"
> sshd_enable="YES"
> usbd_enable="YES"
> # -- sysinstall generated deltas -- # Mon Apr 23 12:52:02 2007
> moused_port="/dev/cuad0"
> moused_type="auto"
> moused_enable="YES"
>
> ## jails
> sendmail_enable="NO"
> inetd_flags="-wW -a 192.168.0.1"
> rpcbind_enable="NO"
>
> jail_enable="YES"   # Set to NO to disable starting of any jails
> jail_list="jail0"     # Space separated list of names of jails
>
> jail_jail0_rootdir="/usr/home/jails/jail0"     # jail's root directory
> jail_jail0_hostname="jail0"  # jail's hostname
> jail_jail0_ip="192.168.0.3"           # jail's IP address
> #jail_jail0_devfs_enable="YES"          # mount devfs in the jail
> #jail_jail0_devfs_ruleset="www_ruleset" # devfs ruleset to apply to jail
>

You do not have your jail IP set up as an alias on your network interface.

You need to add

   ifconfig_sk0_alias0="inet 192.168.0.3 netmask 255.255.0.0"

after your primary interface

   ifconfig_sk0="inet 192.168.0.1  netmask 255.255.0.0"

in the /etc/rc.conf. Then do an

   ifconfig sk0 inet 192.168.0.3 netmask 255.255.0.0 alias

to make it live without having to reboot.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070426112307.U4140>