Setting up DHCPv6 with Dnsmasq and ULA Addresses in OPNsense 25.1

With OPNsense 25.1, Dnsmasq is increasingly becoming the focus for DHCP services and Router Advertisements [1]. This guide will walk you through setting up DHCPv6 with Dnsmasq and additionally configuring Unique Local Addresses (ULA) for your LAN. ULA addresses provide stable, internal IPv6 addresses, independent of your internet provider.

Prerequisites

Ensure that your WAN and LAN interfaces are basically configured in OPNsense.

1. Configure WAN Interface for DHCPv6

First, we configure the WAN interface to obtain an IPv6 prefix from your provider.

Save the changes.

2. Prepare LAN Interface for IPv6

Now, we configure the LAN interface to use the prefix from the WAN interface.

Save the changes.

3. Adjust Default Services

After enabling “Allow manual adjustment” on the LAN interface, you need to ensure that the default IPv6 services for this interface are disabled, as Dnsmasq will take over their functions.

4. Configure Dnsmasq for DHCPv6 and Router Advertisements

Now we configure Dnsmasq to assign IPv6 addresses and send Router Advertisement messages.

Save the changes.

5. Create Virtual IP (VIP) for ULA Address

To use Unique Local Addresses (ULA) in your LAN in addition to global addresses (GUA), create a virtual IP address.

Save the VIP and apply the changes. Dnsmasq should also announce this ULA prefix via Router Advertisement if configured correctly (often automatically if the RA function for the interface is active and the VIP exists).

6. Finalization and Verification

With these steps, you have configured DHCPv6 and Router Advertisements via Dnsmasq and additionally set up ULA addresses for more robust and flexible internal IPv6 addressing in your OPNsense network.