FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
johnathan
Staff
Staff
Article Id 354317
Description This article describes how to use the FortiGate to wake a PC from sleep using a script at a specified interval.
Scope FortiOS.
Solution

It is possible to wake a PC from sleep by using the FortiGate's built in Wake On LAN command alongside an automation stitch.
Navigate to Security Fabric -> Automation -> Trigger, then make a new trigger. Select 'Schedule' near the bottom. 

 

location_auto.PNG        location_auto1.PNG

 

Make a new trigger and specify the time and date to wake the PC. In the screenshot, it will trigger daily at 7AM.

 

wol_schedule.PNG

Navigate to the 'Action' tab, create a new action, then select 'CLI Script' near the bottom.

 

action1.PNG   action2.PNG

Fill out the name, and for the script contents, use the following command (change the details as necessary):

 

execute wake-on-lan <interface_or_port> <host_MAC_address> <protocol> <port> <IP_address> <password>

 

script.PNG

Navigate to the 'Stitch' tab, create a new stitch, then select the Trigger and Action that was just made. 

 

stitch.PNG

 

It is possible to see that the PC specified in that command will have a wake-on-lan packet sent to it every day at 7AM. 

Contributors