opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.36k stars 754 forks source link

Static IPv6 isn't being correctly detected #7004

Closed r3pek closed 1 year ago

r3pek commented 1 year ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

I'm not exactly sure what the problem is, but this is my take on it. I just did an update from OPNsense 23.7.6 to 23.7.8 if my memory doesn't fail me, and while my configuration worked on the previous version, it doesn't on the current one. The most obvious difference is when logging in via ssh (or on the boot screen) where the list of IP address per interface are shown.

 CLOUD_VPN (wg1) -> v4: 172.17.0.2/30
 DMZ (vtnet1)    -> v4: 10.0.10.1/24
 LAB (vtnet3)    -> v4: 10.0.12.1/24
 LAN (vtnet4)    -> v4: 10.0.0.20/24
 PROD (vtnet2)   -> v4: 10.0.11.1/24
 REMOTE_VPN (wg2) -> v4: 10.2.0.1/24
 WAN (vtnet0)    -> v4: 172.18.0.2/30
                    v6/DHCP6: 2001:818:dcb6:6e00:7066:xxxx:xxxx:xxxx:xxxx/64

While this only shows IPv4 addresses, it previously showed the configured static IPv6 addresses configured on the CLOUD_VPN, DMZ, LAN and PROD interfaces.

image

The interfaces themselves have the IPv6 configured confirmed from the web gui and via command line (ifconfig).

The problem with this is that any IPv6 specific service doesn't start. radvd and dhcp6 aren't starting and I really can't find out why. The only thing I see on the logs are, when forcing a configuration onto an interface (just keeping the same values) and applying it, I get this:

<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="142"] /interfaces.php: ROUTING: entering configure using 'opt2'
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="143"] /interfaces.php: plugins_configure ipsec (,opt2)
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="144"] /interfaces.php: plugins_configure ipsec (execute task : ipsec_configure_do(,opt2))
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="145"] /interfaces.php: plugins_configure dhcp ()
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="146"] /interfaces.php: plugins_configure dhcp (execute task : dhcpd_dhcp_configure())
<12>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="147"] /interfaces.php: dhcpd_dhcp6_configure() found no suitable IPv6 address on opt2(vtnet2)
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="148"] /interfaces.php: plugins_configure dns ()
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="149"] /interfaces.php: plugins_configure dns (execute task : dnsmasq_configure_do())
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="150"] /interfaces.php: plugins_configure dns (execute task : unbound_configure_do())
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="151"] /interfaces.php: ROUTING: entering configure using defaults
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="152"] /interfaces.php: ROUTING: configuring inet default gateway on wan
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="153"] /interfaces.php: ROUTING: keeping inet default route to 172.18.0.1
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="154"] /interfaces.php: ROUTING: configuring inet6 default gateway on wan
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="155"] /interfaces.php: ROUTING: keeping inet6 default route to fe80::2ad1:27ff:fe4e:4a70%vtnet0
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="156"] /interfaces.php: plugins_configure monitor ()
<13>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="157"] /interfaces.php: plugins_configure monitor (execute task : dpinger_configure_do())
<12>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="158"] /interfaces.php: The required LAN_GWv6 IPv6 interface address could not be found, skipping.
<12>1 2023-11-11T00:34:00+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="159"] /interfaces.php: The required CLOUD_VPN_GWv6 IPv6 interface address could not be found, skipping.
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="160"] /interfaces.php: plugins_configure newwanip (,opt2)
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="161"] /interfaces.php: plugins_configure newwanip (execute task : dnsmasq_configure_do())
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="162"] /interfaces.php: plugins_configure newwanip (execute task : igmpproxy_configure_do())
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="163"] /interfaces.php: plugins_configure newwanip (execute task : ntpd_configure_do())
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="164"] /interfaces.php: plugins_configure newwanip (execute task : opendns_configure_do())
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="165"] /interfaces.php: plugins_configure newwanip (execute task : openssh_configure_do(,opt2))
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="166"] /interfaces.php: plugins_configure newwanip (execute task : unbound_configure_do(,opt2))
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="167"] /interfaces.php: plugins_configure newwanip (execute task : vxlan_configure_do())
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="168"] /interfaces.php: plugins_configure newwanip (execute task : webgui_configure_do(,opt2))
<13>1 2023-11-11T00:34:01+00:00 OPNsense-HomeLab.int.r3pek.org opnsense 13458 - [meta sequenceId="169"] /interfaces.php: plugins_configure newwanip (execute task : wireguard_sync(,opt2))

Not exactly sure what changed and why it worked before and not now. maybe something to do with using fdXX:: addresses??

To Reproduce

Steps to reproduce the behavior:

  1. Sorry, can't help here :(

Expected behavior

The static IPv6 addresses should be considered valid and make everything work

Describe alternatives you considered

None so far

Screenshots

Added on the description

Relevant log files

Added on the description

Additional context

Add any other context about the problem here.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 23.7.8-amd64 FreeBSD 13.2-RELEASE-p5 OpenSSL 1.1.1w 11 Sep 2023 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (4 cores, 4 threads) (Virtualized via Proxmox)

r3pek commented 1 year ago

Could this have been caused by the patch on #6939?

EDIT: Confirmed. Reverting the patch (manually), fixed the problem for me.

fichtner commented 1 year ago

See https://forum.opnsense.org/index.php?topic=36893