From owner-freebsd-net@freebsd.org Wed Mar 18 15:58:46 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4A8E2646EE; Wed, 18 Mar 2020 15:58:46 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48jF854Bbgz3J7P; Wed, 18 Mar 2020 15:58:45 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=KzBDw5YvZI5rrxObsxyC1efZh5x6afXl3mMmh60xiGI=; b=VrvNPUj9Gz3Rel5VjQCEt5AubE JuPVRqpPkmxe8P9FWaAkKEfJUbynBzRVyV7iiKyPZHGI3SdCF15hdE5NeMqItsjacQfLvKyP0lZRS VU6tFIZX+5x4t8qJuAQBXn2vaP5TUTJZVoM7RXa28ePsLgLl8sg1KXLRutjVl+9htqwc=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jEb5f-000HK6-OI; Wed, 18 Mar 2020 22:58:43 +0700 Date: Wed, 18 Mar 2020 22:58:43 +0700 From: Victor Sudakov To: "Bjoern A. Zeeb" Cc: freebsd-questions@freebsd.org, freebsd-net@freebsd.org Subject: Re: IPv6 in jails Message-ID: <20200318155843.GA66451@admin.sibptus.ru> References: <20200318151556.GA64871@admin.sibptus.ru> <069AA173-29F1-4F9F-B7D6-31BF2C559C17@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <069AA173-29F1-4F9F-B7D6-31BF2C559C17@lists.zabbadoz.net> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 48jF854Bbgz3J7P X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=VrvNPUj9; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-8.44 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.984,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; IP_SCORE(-3.36)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.92), country: US(-0.05)]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 15:58:47 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bjoern A. Zeeb wrote: > >=20 > > Is IPv6 in jails supposed to work? Does not work for me, what am I doing > > wrong? > >=20 > > Here is a test jail: > >=20 > > test4 { > > path =3D /d02/jails/test4 ; > > mount.devfs; > > ip4 =3D new; > > ip6 =3D new; > > ip4.addr =3D 192.168.4.204/24; > > ip6.addr =3D 2001:470:ecba:3::4/64; >=20 > I usually do something like this: >=20 > ip6.addr +=3D "lo0|2001:db8:1234:5678::ef/128"; >=20 > to add the single address out of a /64 to the loopback interface on the h= ost > and then pass it through to the jail. The /64 however is actually routed= to > my host so might not work if you have the /64 on the physical interface. >=20 > Given it is a jail without vnet you cannot assign a /64 to the jail, you > want to just specify the address usually (plainly or as /128). Bjoern, I've just changed "ip6.addr =3D 2001:470:ecba:3::4/64" to "ip6.addr =3D 2001:470:ecba:3::4/128" per your advice, and restarted the jails, without any visible result. The daemons inside still listen only on tcp4: root@test4:/ # sockstat -l USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS = =20 root sendmail 18711 3 tcp4 192.168.4.204:25 *:* root sshd 18708 3 tcp4 192.168.4.204:22 *:* root syslogd 18643 5 udp4 192.168.4.204:514 *:* root syslogd 18643 6 dgram /var/run/log root syslogd 18643 7 dgram /var/run/logpriv root@test4:/ #=20 >=20 > One thing to check first is ifconfig inside the jail does see the > address? Still does, but no use: root@test4:/ # ifconfig re1 re1: flags=3D8843 metric 0 mtu 1500 description: Inside options=3D8209b ether c4:12:f5:33:c9:7c inet 192.168.4.204/24 broadcast 192.168.4.255 inet6 2001:470:ecba:3::4/128 media: Ethernet autoselect (none) status: no carrier nd6 options=3D21 root@test4:/ #=20 --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeckUzAAoJEA2k8lmbXsY0P6gIAK+R6dUgrUEKSv8Jpx6PvOdG 8es9bieElW2jqt2XI0/uH8Rt2AtQuS/Jtq90AKxDETolFN+8PWS8u9kT3agrXi/Q qrp60W5LQ1rVmeSoKgRW8JU6fmiZGeLZd6+/ZkUvimwQ1rA1uLqNnLRFpGGqNlMk VMRjkvcUnh4A4CqJHm2QetfeDhvVrQW6Pmp+qzwFKbg0uL7MRzfaIcqx4L8RrI5t LF6W6udZF+zF9dl0B+pTdmv3rjqC4AUzLbQ5Zkdiu52xElBvGIL10XlL6R8RDB0k hrlvW7nbDvc49zL5huhyaeDQgoyxtvK1mHqiEN1hfaTjNG5Kz/E+Qdjp2sYZPcU= =QZ6h -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--