I have setup a FreeBSD 9 server with a jail. When I enter my new jail it doesn't have any network interfaces available. ifconfig gives no output at all and trying to start any services which uses networking results in a failure. The jail was created in accordance to the handbook by using the following commands.
/etc/rc.conf:
/etc/sysctl.conf:
A session in the jail to show the issue:
I have another server with about the same configuration where it works. The only configuration difference that I can see between the two are other IP addresses and hostnames. Both are running FreeBSD 9 amd64 and live in the same subnet.
Code:
# cd /usr/src
# make buildworld
# make installworld DESTDIR=/storage/ntp
# make distribution DESTDIR=/storage/ntp
# mount -t devfs devfs /storage/ntp/dev
# cp /etc/resolv.conf /storage/ntp/etc/resolv.conf
# cp /etc/localtime /storage/ntp/etc/localtime
# /etc/rc.d/jail start
/etc/rc.conf:
Code:
hostname="jh5.mydomain.com"
keymap="swedish.iso.kbd"
defaultrouter="91.xxx.yyy.1"
ifconfig_bge0="inet 91.xxx.yyy.55 netmask 255.255.255.192"
ifconfig_bge0_alias0="inet 91.xxx.yyy.52 netmask 255.255.255.192"
jail_enable="YES"
jail_list="ntp"
jail_ntp_rootdir="/storage/ntp"
jail_ntp_hostname="ntp.mydomain.com"
jail_ntp_ip="91.xxx.yyy.52"
jail_ntp_devfs_enable="YES"
/etc/sysctl.conf:
Code:
security.jail.enforce_statfs=2
security.jail.mount_allowed=1
security.jail.set_hostname_allowed=1
security.jail.socket_unixiproute_only=1
security.jail.chflags_allowed=1
security.jail.sysvipc_allowed=1
security.jail.allow_raw_sockets=1
A session in the jail to show the issue:
Code:
jh5# jls
JID IP Address Hostname Path
2 91.xxx.yyy.52 ntp.mydomain.com /storage/ntp
jh5# jexec 2 tcsh
root@ntp:/ # ifconfig -a
root@ntp:/ # ntpd -n
/usr/src/usr.sbin/ntp/libntp/../../../contrib/ntp/libisc/ifiter_getifaddrs.c:106: INSIST(ifa != ((void *)0)) failed.
Abort (core dumped)
I have another server with about the same configuration where it works. The only configuration difference that I can see between the two are other IP addresses and hostnames. Both are running FreeBSD 9 amd64 and live in the same subnet.