From owner-freebsd-jail@freebsd.org Sat Aug 27 16:22:15 2016 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 991A0B7702A for ; Sat, 27 Aug 2016 16:22:15 +0000 (UTC) (envelope-from rleigh@codelibre.net) Received: from auth.a.painless.aa.net.uk (auth.a.painless.aa.net.uk [90.155.4.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6856E961 for ; Sat, 27 Aug 2016 16:22:15 +0000 (UTC) (envelope-from rleigh@codelibre.net) Received: from 7.5.2.1.f.5.e.f.f.f.c.4.4.a.2.6.d.b.d.d.0.6.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:860:ddbd:62a4:4cff:fe5f:1257]) by a.painless.aa.net.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1bdgN1-0000Yt-L3 for freebsd-jail@freebsd.org; Sat, 27 Aug 2016 17:22:12 +0100 To: freebsd-jail@freebsd.org From: Roger Leigh Subject: Jails and IPv6 local loopback Message-ID: Date: Sat, 27 Aug 2016 17:22:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2016 16:22:15 -0000 Hi list, I saw https://lists.freebsd.org/pipermail/freebsd-jail/2011-March/001500.html in the archives but didn't see anything more recent. This is with 10.3-RELEASE % freebsd-version 10.3-RELEASE-p6 % jls JID IP Address Hostname Path [...] 3 192.168.1.12 bfcpp.codelibre.net /jail/bfcpp [...] From jail.conf: bfcpp { host.hostname = "bfcpp.codelibre.net"; interface = "bge0"; ip4.addr = "192.168.1.12"; ip6.addr = "2001:8b0:860:ddbd:3aea:a7ff:feab:7002"; allow.raw_sockets = "1"; path = "/jail/bfcpp"; mount.devfs; mount.fdescfs; mount.procfs; mount.fstab="/etc/fstab.bfcpp"; exec.start = "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.clean; exec.jail_user = "root"; exec.system_jail_user; } amys% ping -c1 localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.046 ms --- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.046/0.046/0.046/0.000 ms amys% ping6 -c1 localhost PING6(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.252 ms --- localhost ping6 statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.252/0.252/0.252/0.000 ms Inside this jail: bfcpp% ifconfig bge0: flags=8843 metric 0 mtu 1500 options=c019b ether 38:ea:a7:ab:61:53 inet 192.168.1.12 netmask 0xffffffff broadcast 192.168.1.12 inet6 2001:8b0:860:ddbd:3aea:a7ff:feab:7002 prefixlen 128 nd6 options=21 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 nd6 options=21 bfcpp% ping localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.056 ms ^C --- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.056/0.056/0.056/0.000 ms bfcpp% ping6 localhost PING6(56=40+8+8 bytes) 2001:8b0:860:ddbd:3aea:a7ff:feab:7002 --> ::1 ping6: sendmsg: Can't assign requested address ping6: wrote localhost 16 chars, ret=-1 ping6: sendmsg: Can't assign requested address ping6: wrote localhost 16 chars, ret=-1 ping6: sendmsg: Can't assign requested address ping6: wrote localhost 16 chars, ret=-1 ^C --- localhost ping6 statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss As you can see, inside the jail I have a working IPv4 loopback, but not a working IPv6 loopback. Both work correctly on the host system. This is inconsistent, and it's breaking stuff which needs the v6 loopback to be functional. Is this a case of a bad default, a misconfiguration or a bug in the loopback support for jails? Thanks, Roger