BastilleBSD / bastille

Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
https://bastillebsd.org
BSD 3-Clause "New" or "Revised" License
829 stars 131 forks source link

[ENHANCEMENT] IPV6 accept_rtadv #494

Closed samob closed 11 months ago

samob commented 2 years ago

Hi Is your feature request related to a problem? Please describe. I'm pretty new to FreeBSD and only recently started using Bastille. I have set myself on a journey to get to know virtualization and IPV6 a little better, since my ISP offers that to users. On my host machine I simply put ifconfig_em0_ipv6="inet6 accept_rtadv" in my /etc/rc.conf I get IPV6 address and everything is working.

Describe the solution you'd like To me as newb, perfect solution to enable ipv6 in a container, would be to use same notation as in the host: "inet6 accept_rtadv". It would be much easier then punching these long ipv6 addresses. Or am I totally missing point here and there is already a way to do autoconfiguration of ipv6 address in container? In the examples, there is only a way to enter ipv6 address manually. Something like this in a config:

  interface = bastille0;
  ip4.addr = 192.168.1.11;
  ip6 = inet6 accept_rtadv;
adriel-tech commented 2 years ago

bastille0 is a lo interface which requires a NAT. In order to use "inet6 accept_rtadv" as you want you'd use that in a VNET jail which has it's own network stack. I have tried to manually setup bastille0 with an IPv6 NAT but it was not straight forward.

I usually use a VNET jail and place this in my VNET jail's /etc/rc.conf

ipv6_privacy="YES"
ipv6_activate_all_interfaces="YES"
rtsold_enable="YES"
rtsold_flags="-aFm"

And this in the hosts /etc/rc.conf ifconfig_em0_ipv6="inet6 accept_rtadv auto_linklocal"

em0 being my hosts network interface.

bmac2 commented 11 months ago

@samob Did the solution/ explanation above solve your issue? As this thread is over a year old I assume it did. Closing as solved.