Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2020 22:58:43 +0700
From:      Victor Sudakov <vas@sibptus.ru>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        freebsd-questions@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: IPv6 in jails
Message-ID:  <20200318155843.GA66451@admin.sibptus.ru>
In-Reply-To: <069AA173-29F1-4F9F-B7D6-31BF2C559C17@lists.zabbadoz.net>
References:  <20200318151556.GA64871@admin.sibptus.ru> <069AA173-29F1-4F9F-B7D6-31BF2C559C17@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Bjoern A. Zeeb wrote:
> > 
> > Is IPv6 in jails supposed to work? Does not work for me, what am I doing
> > wrong?
> > 
> > Here is a test jail:
> > 
> > test4 {
> >         path = /d02/jails/test4 ;
> >         mount.devfs;
> >         ip4 = new;
> >         ip6 = new;
> >         ip4.addr = 192.168.4.204/24;
> >         ip6.addr = 2001:470:ecba:3::4/64;
> 
> I usually do something like this:
> 
>         ip6.addr += "lo0|2001:db8:1234:5678::ef/128";
> 
> to add the single address out of a /64 to the loopback interface on the host
> 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.
> 
> 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 = 2001:470:ecba:3::4/64" to
"ip6.addr = 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      
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:/ # 

> 
> 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=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: Inside
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        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=21<PERFORMNUD,AUTO_LINKLOCAL>
root@test4:/ # 


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJeckUzAAoJEA2k8lmbXsY0P6gIAK+R6dUgrUEKSv8Jpx6PvOdG
8es9bieElW2jqt2XI0/uH8Rt2AtQuS/Jtq90AKxDETolFN+8PWS8u9kT3agrXi/Q
qrp60W5LQ1rVmeSoKgRW8JU6fmiZGeLZd6+/ZkUvimwQ1rA1uLqNnLRFpGGqNlMk
VMRjkvcUnh4A4CqJHm2QetfeDhvVrQW6Pmp+qzwFKbg0uL7MRzfaIcqx4L8RrI5t
LF6W6udZF+zF9dl0B+pTdmv3rjqC4AUzLbQ5Zkdiu52xElBvGIL10XlL6R8RDB0k
hrlvW7nbDvc49zL5huhyaeDQgoyxtvK1mHqiEN1hfaTjNG5Kz/E+Qdjp2sYZPcU=
=QZ6h
-----END PGP SIGNATURE-----

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