WOL Comand lLine
-
I'm using cron to schedule the awakening of some servers, but I can't send the correct string, I send (on cron, always pfsense) wol -i 192.168.1.0 MAC, but it doesn't work, if I use the pfsense wol service, instead it works without problems.
Am I wrong to pass the string in cron? Yet I saw the guide to the freebsd command. -
That's the actual command you're using? It fails both in cron and from the CLI?
In cron you need to use the full path to the command.
Steve
-
@stephenw10
/usr/local/bin/wol -i 192.168.1.0 MAC, correct? -
The actual IP address doesn't matter since the target doesn't have an IP at that time but it determines which NIC pfSense will send the packet from.
Try it without specifying the host. Try it with verbose set.
-
@stephenw10 Hi,
by the command line i get , ok ( no error), but the host does not awake, If I sent the wol from pfsense interface( wol service) the host wake up, and work, but, by command line nothing... -
Ah you need to send it to the broadcast address: https://github.com/pfsense/pfsense/blob/RELENG_2_7_2/src/usr/local/www/services_wol.php#L51
So:
/usr/local/bin/wol -i 192.168.1.255 xx:xx:xx:xx:xx:xx
[2.7.2-RELEASE][admin@t70.stevew.lan]/root: wol -vi 172.21.16.255 00:0e:8e:24:cd:0a Waking up 00:0e:8e:24:cd:0a with 172.21.16.255:40000...
Works.
-
@stephenw10 I tried it, works!
Thanks a lot