OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: mkaluza on December 14, 2018, 01:06:23 am

Title: os-wol plugin
Post by: mkaluza on December 14, 2018, 01:06:23 am
Hello, where can I find the os-wol plugin LOGs? If I send the wol packet to the LAN interface, I get this message:

"The packet was not sent due to an error. Please consult the logs."

If I send the wol packet to a WAN interface, it will normally be sent....
Title: Re: os-wol plugin
Post by: fabian on December 14, 2018, 06:14:17 pm
Since the plugin has no logfile -> syslog
Title: Re: os-wol plugin
Post by: mkaluza on December 15, 2018, 01:44:39 am
I do not have any syslog server, so far I have noticed in System -> Log Files -> Backend the following records appear after the packet is sent:
configd.py: [323c54e2-7c34-45c2-a9a5-a037e7abf9cf] returned exit status 1
configd.py: [f3e2dd75-b119-4707-b016-baa21779d668] returned exit status 1
configd.py: [7f8bba51-4eb3-4b9e-980e-1e74d6a150a0] returned exit status 1
configd.py: [95880cd0-1ce8-4d84-84b7-7a447c14862c] returned exit status 1
configd.py: [f5a7ea2b-effect5-4149-a580-bda7fb350b95] returned exit status 1

Do you have any idea what can I do to wol service working on the LAN interface?
Title: Re: os-wol plugin
Post by: mibsy on January 26, 2019, 10:10:09 pm
I'm having the exact same issue with the same error. Did you ever identify the cause or solution? My guess is the plugin needs updating due to a change in the base OPNsense code, but I am pulling that out of the air. I have my configured only on my LAN interface, I've uninstalled and reinstalled the WoL plugin, and the LAN net doesn't have anything special that I can think of (it's not a VLAN, no bridging, no odd filtering, etc.
Title: Re: os-wol plugin
Post by: fabian on January 26, 2019, 11:07:24 pm
can you run /usr/local/bin/wol -i BROADCAST_IP MAC from your command line? It may return an error.
Title: Re: os-wol plugin
Post by: mibsy on January 28, 2019, 04:26:37 am
Funny, I was playing around with that last night before your message and I didn't get an error, but it wouldn't wake up the machine I was testing it against. Turns out, someone turned that machine off!  Anyhow, I tested it today against two other machines that were asleep and the command line works perfectly. The machines wake up, no errors and I can ping them. I'm trying to dig into the scripts and such to see where it gets called from the web interface.
Title: Re: os-wol plugin
Post by: mix on June 14, 2019, 10:49:55 pm
It seems that the broadcast ip in private function calculateSubnetBroadcast ($ip_addr, $cidr) is incorrectly calculated. In my case, broadcast ip was calculated as -64.168.255.255 for a 16 bit mask. In this situation, of course, it will not be able to work properly.

The error is in line 149 in the WolController.php file:
instead
$int_bcast >> 24,
should be
($int_bcast >> 24) & 255,
Title: Re: os-wol plugin
Post by: fabian on June 14, 2019, 10:54:07 pm
I created a ticket for this error: https://github.com/opnsense/plugins/issues/1368