WOL can't wake up OPNsense

Started by Phil, July 28, 2025, 06:23:58 PM

Previous topic - Next topic
Hi since the update i can't wake up OPNsense by lan (it was working before), is it the same for you?
Must i check an option somewhere?

Best regards

If someone could answer/help should be great

Best regards

More data would be nice: worked or did not work on 25.1, which NIC driver, etc?


Cheers,
Franco

July 30, 2025, 06:07:07 PM #3 Last Edit: July 31, 2025, 08:35:29 PM by Phil Reason: Mistake about Intel nic chipset
Hi thx for the answer, it was working on 25.1, the pc is HP Compaq with Dual core E5300, the NIC is Intel onboard chip Intel(R) 82579LM.
How could i check the NIC driver version?

Best regards

Hello, I noticed that if I shut down OpenSense using the normal manual procedure or cron, I cannot turn it on remotely. However, after a power outage, I can turn it on remotely.
As said before it was working in 25.1 (and before)
So it is definitely a problem with 25.7 (I have the same problem on both of my OpenSense devices, both of which are running 25.7).

Hope you'll can fix it fastly

Best regards

Just to dampen expectations Im quite sure there are not a lot of people who turn on and off a router all the time via WOL. It might be simpler to hook it to some smart power plug now.
Hardware:
DEC740

Hi ok found driver version
root@OPNsense:~ # sysctl -a | grep -E 'dev.(igb|ix|em).*.%desc:'
dev.em.0.%desc: Intel(R) 82567LM-3 ICH10

Thx for the smart power plug idea but isn't it easy to fix it for you?
I should happy to avoid this solution for now

PS: I'm a newbee in FreeBSD, I found this link:
https://linux-bsd-sharing.blogspot.com/2012/06/howto-enable-wake-on-lan-on-freebsd.html
In step 02 is it normal i get this:
root@OPNsense:~ # grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c
grep: No match.

Best Regards

@Phil. Can you post the results from "$ifconfig -m"

Hi,
root@OPNsense:~ # ifconfig -m
em0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        description: WAN (wan)
        options=4802028<VLAN_MTU,JUMBO_MTU,WOL_MAGIC,HWSTATS,MEXTPG>
        capabilities=4f53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
        ether 00:26:b3:19:bd:cf
        inet 192.168.50.2 netmask 0xffffff00 broadcast 192.168.50.255
        media: Ethernet 1000baseT <full-duplex>
        status: active
        supported media:
                media autoselect
                media 1000baseT
                media 1000baseT mediaopt full-duplex
                media 100baseTX mediaopt full-duplex
                media 100baseTX
                media 10baseT/UTP mediaopt full-duplex
                media 10baseT/UTP
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
re0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        description: LAN (lan)
        options=2009<RXCSUM,VLAN_MTU,WOL_MAGIC>
        capabilities=603f1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:31:92:52:d5:ca
        inet 10.0.50.1 netmask 0xffffff00 broadcast 10.0.50.255
        media: Ethernet 1000baseT <full-duplex>
        status: active
        supported media:
                media autoselect
                media 1000baseT mediaopt full-duplex
                media 100baseTX mediaopt full-duplex
                media 100baseTX
                media 10baseT/UTP mediaopt full-duplex
                media 10baseT/UTP
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
enc0: flags=0 metric 0 mtu 1536
        options=0
        capabilities=0
        groups: enc
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
pflog0: flags=20100<PROMISC,PPROMISC> metric 0 mtu 33152
        options=0
        capabilities=0
        groups: pflog
pfsync0: flags=0 metric 0 mtu 1500
        options=0
        capabilities=0
        maxupd: 128 defer: off version: 1400
        syncok: 1
        groups: pfsync
wg1: flags=10080c1<UP,RUNNING,NOARP,MULTICAST,LOWER_UP> metric 0 mtu 1420
        description: WG_RW (opt2)
        options=80000<LINKSTATE>
        capabilities=80000<LINKSTATE>
        inet 10.12.0.14 netmask 0xffffff00
        groups: wg wireguard
        nd6 options=9<PERFORMNUD,IFDISABLED>
root@OPNsense:~ #

thanks. It appears the option is available WOL_MAGIC and I assume you are talking about sending the magic packet to this nic "re0" which seems to be your LAN.
That said, your WAN seems to have a local IP so that suggests a router behind another. Therefore I would check the routes and firewall rules and trace the path of packets along the way. A packet capture might be useful.

August 06, 2025, 09:23:54 PM #10 Last Edit: August 06, 2025, 09:30:49 PM by Phil
Hi, thx for your answer.
I meant on WAN (I want wake up the router from internet. It worked in 25.1 and with previous version too)
The option is available WOL_MAGIC but is it enable?
After a power outage, I can turn it on remotely, if wol with magic packet is enable on the wan nic, isn't it a prob about ACPI and how the router shutdown? (S1, S3, S5...).
Something changed about it between 25.1 and 25.7?

Best Regards

PS: from memory i can't test wol on re0 because the bios don't permit to wake up on pcie nic, i can only on the onboard chip

Hello. Please re-read:
"That said, your WAN seems to have a local IP so that suggests a router behind another. Therefore I would check the routes and firewall rules and trace the path of packets along the way. A packet capture might be useful. "
Remember wol packets go via arp. I'd be inclined to try "take it off and put back on" (wol on the nic) in case it needs it for some reason at the next step. But this is only useful after a packet capture shows the packet not triggering the action. OR you could test the reception of those packets on another machine. Again packet caputer on that to see it if arrives.

Hi, thx for your help sorry because of the langage barrier I'm not sure to understand and to be understand fully

Yes I confirm the WAN has a local ip, Opnsense is behind an Internet box in router mode yes, This box lets the Magic packet through.
Internet Box (in router mode) -----------------> Opnsense ----> PC
192.168.50.200                                                    192.168.50.2     10.0.x.x
The packet arrives because if I shut down Opnsense normally (at this point, the packet does not wake it up) but if then I unplug the power cord from the Opnsense for 15-30 seconds before plugging it back in, the packet wakes up Opnsense.

When i send a Magic packet on Opnsense (Firewall direct view) i get this so the internet box isn't the prob right?:
WAN      2025-08-07T11:32:34   192.168.50.200:50853   192.168.50.255:9   udp   Default deny / state violation rule

My aim is only to be able to wake up the Opnsense after a normal shutdown (without unplug/plug back the power cord from the Opnsense)

Here i don't try to wake up the pc behind the Opnsense

QuoteI'd be inclined to try "take it off and put back on" (wol on the nic) in case it needs it for some reason at the next step

Ah yes good idea how could i do it please?

Best regards

Quote from: Phil on August 07, 2025, 12:25:06 PMWhen i send a Magic packet on Opnsense (Firewall direct view) i get this so the internet box isn't the prob right?:
WAN      2025-08-07T11:32:34  192.168.50.200:50853  192.168.50.255:9  udp  Default deny / state violation rule
Hi. This suggests that OPN firewall has blocked it but I'm actually not sure if is relevant at this point. The firewall will be off when the machine and nic are not awake.
Quote from: Phil on August 07, 2025, 12:25:06 PMHere i don't try to wake up the pc behind the Opnsense

QuoteI'd be inclined to try "take it off and put back on" (wol on the nic) in case it needs it for some reason at the next step

Ah yes good idea how could i do it please?
I clearly don't know how you did it before but normally
remove:
#ifconfig em0 -wol
add:
#ifconfig em0 wol

It will need a powercycle.
Don't forget to check BIOS/EFI, power states - that kind of thing.
You said it worked before the update but sometimes happens that those settings are reset.

Thx a lot i tried but no success.
I doubt it's firmware because it shouldn't be on both router at the same time (they aren't on the same place, but same config and same results) and why it should work after unplug/plug back the power cord from the Opnsense

Do you know how could i check the ACPI sleeping states?

Best regards