OPNsense Forum

English Forums => 26.7 Series => Topic started by: pstretch on July 18, 2026, 06:47:39 PM

Title: 26.7 DHCP WAN gateway online but no IPv4 default route after boot
Post by: pstretch on July 18, 2026, 06:47:39 PM
I've been investigating an issue on OPNsense 26.7 where the WAN interface obtains a DHCP lease successfully and the associated gateway appears online, but the firewall does not install an IPv4 default route after boot.

Symptoms

Diagnosis

Immediately after boot:


Running the following command manually restores normal operation:
configctl interface routes configure

After executing the command:


#After reboot
netstat -rn4 | grep default
# no output

# Fix
configctl interface routes configure
 
# Afterwards
netstat -rn4 | grep default
default 83.217.167.129 UGS igb0


Has anyone seen a similar problem or have any further information, please?

Title: Re: 26.7 DHCP WAN gateway online but no IPv4 default route after boot
Post by: vicemor on July 18, 2026, 10:59:08 PM
I also have this exact problem. I got it to work and survive boot by editing default gateway and selecting "Disable Gateway Monitoring". I guess OPNsense doesn't set default route for gateway if getting IP address for the WAN takes too much time after boot. Something has changed in the 26.7 version. 
Title: Re: 26.7 DHCP WAN gateway online but no IPv4 default route after boot
Post by: livtec on July 20, 2026, 02:24:04 PM
Hello

We are experiencing a similar problem.

The issue is not that no default gateway exists. Rather, the system selects an incorrect gateway instead of the intended upstream gateway. We believe this occurs because the correct gateway takes longer to initialize at boot, and the system temporarily uses an alternative gateway that is already available.

Other forum posts mention DHCP issues and delayed WAN interface initialization. This appears to be the common factor.

The following solutions have worked for us (temporary workaround):

Option 1: Click «Apply» in the WEB UI Router/Gateway configuration, or
Option 2: Execute: configctl interface routes configure

This forces a route recalculation and ensures the correct gateway is used.

Please note: This fix is not permanent. After a reboot, the problem reoccurs and the same steps must be repeated.