This script automatically detects and sets the correct IPv6 default gateway when multiple Router Advertisements are present on your WAN interface and OPNsense picks the wrong one as the default gateway. This results it routing issues and loss of connectivity to the internet.
Some network setups (particularly fiber connections with ONTs) may send multiple Router Advertisements:
- ONT/Bridge device (wrong): Low preference, lifetime: 0s (explicitly says "don't use me")