From owner-freebsd-jail@FreeBSD.ORG Fri Apr 10 14:05:07 2009 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 780B9106566B for ; Fri, 10 Apr 2009 14:05:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 327F08FC20 for ; Fri, 10 Apr 2009 14:05:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 1D92F41C75C; Fri, 10 Apr 2009 16:05:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id PipEaFweYxmU; Fri, 10 Apr 2009 16:05:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id B005641C75B; Fri, 10 Apr 2009 16:05:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 114904448E6; Fri, 10 Apr 2009 14:00:48 +0000 (UTC) Date: Fri, 10 Apr 2009 14:00:48 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: JAKO Andras In-Reply-To: Message-ID: <20090410135647.E15361@maildrop.int.zabbadoz.net> References: X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-jail@freebsd.org Subject: Re: lo0's IPv6 address overwritten X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2009 14:05:07 -0000 On Fri, 10 Apr 2009, JAKO Andras wrote: > Hi, > > Starting a jail with one IPv4 and one IPv6 address on a few days old > RELENG_7 overwrites lo0's ::1 with the jail's IPv6 address. (The jail's > addresses are preconfigured on lo1.) > > Is this expected behaviour? Or did I made something the wrong way? > > Here's ifconfig(8)'s output before and after executing jail(8), and also > from inside of the jail. testing this on a bit older HEAD: ifconfig lo1 create inet6 2001:738:2001:1000::2/128 ifconfig lo0 ; ifconfig lo1 lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 lo1: flags=8049 metric 0 mtu 16384 options=3 inet6 2001:738:2001:1000::2 prefixlen 128 jail -l -U root -i / hostname "2001:738:2001:1000::2" /bin/sh 1 # sysctl security.jail.jailed security.jail.jailed: 1 # ifconfig lo0; ifconfig lo1 lo0: flags=8049 metric 0 mtu 16384 options=3 lo1: flags=8049 metric 0 mtu 16384 options=3 inet6 2001:738:2001:1000::2 prefixlen 128 [ another xterm ] bz@:~> sysctl security.jail.jailed security.jail.jailed: 0 bz@:~> ifconfig lo0 ; ifconfig lo1 lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 lo1: flags=8049 metric 0 mtu 16384 options=3 inet6 2001:738:2001:1000::2 prefixlen 128 .. ifconfig lo1 destroy I wonder what's going onfor you. Can you check with netstat -rn -f inet6 that what you are seeing is indeed true? Can you try starting the jail to get an interactive shell and not running any scripts like I did and check what happens then? /bz -- Bjoern A. Zeeb The greatest risk is not taking one.