Setting IPv6 on a FreeBSD 12.4 machine

Greetings !

I am a newbie FreeBSD user, and my ISP gave me a set of IPv6 addresses.

ISP gave me this :

*WAN (interface to internet)*
IP: FE80::2A02:2F0F:280
GW: FE80::d161

=============================================

*LAN (interface towards internal network)*
2A02:2F0F:280::1/48

=============================================

*Echipaments from behind router :*

IP: 2A02:2F0F:280::2/48

GW: 2A02:2F0F:280::1
DNS1: 2a02:2f0c:8000:8::1
DNS2: 2a02:2f0c:8000:3::1


What settings in /etc/rc.conf should I do, in order to activate IPv6 on my server/router machine ?

I tried :

ipv6_enable="YES"
ipv6_gateway_enable="YES"
ifconfig_em0_ipv6="inet6 fe80::2a02:2f0f:280 prefixlen 48 -auto_linklocal accept_rtadv no_radr"
ipv6_defaultrouter="inet6 fe80::d161%em0"
ifconfig_em0_alias0="inet6 2a02:2f0f:280::1 prefixlen 48"

but

root@unixcoder:~ # ping6 www.google.com
ping6: UDP connect: No route to host
root@unixcoder:~ #

Please help me.
Thank you very much !
Alexander,
Unix hobbyist

 
Remove ipv6_enable and set the 2a02 address on ifconfig_em0_ipv6.

Code:
ipv6_gateway_enable="YES"
ifconfig_em0_ipv6="inet6 2a02:2f0f:280::1 prefixlen 48"
ipv6_defaultrouter="inet6 fe80::d161%em0"
 
alexandrugoia Your IPv6 isn't configured, or not correctly at least. Can't tell you anything more without information. Maybe post your issue in its own thread?

goia.i.alexandru Rereading the instructions. One important thing to note, FreeBSD 12.4 is EoL and not supported anymore. Not a good idea to use this version for a new installation. If this is a existing system, upgrade to 13.2 or 14.0.

I'm going to assume em0 is connected to the WAN and em1 is connected to the LAN. The instructions given by the provider are for a router/firewall. Meaning it has to have at least two interfaces.

Code:
ipv6_gateway_enable="YES"
ifconfig_em0_ipv6="inet6 fe80::2a02:2f0f:280 prefixlen 48 -auto_linklocal"
ipv6_defaultrouter="inet6 fe80::d161%em0"
ifconfig_em1_ipv6="inet6 2a02:2f0f:280::1 prefixlen 48"
Not sure if you need accept_rtadv or no_radr on the WAN interface. Looks like the provider uses predefined link-local address (fe80 is a link-local address). Router advertisements are probably not needed because they gave you a specific gateway address. If you want to provide SLAAC addresses on the LAN side you'll need to enable rtadvd(8) on em1.
 
Back
Top