pfSenseWOL
Introduction
PHP library for calling pfSense's 2.1 WOL function using CURL., (*1)
My internal network makes use of multiple VLANs, there was no simply solution to get WOL working across multiple VLANs so decided to put this script together., (*2)
Installation
Using Composer (recommended)
Add the following to your composer.json file, (*3)
{
"require": {
"phillipsnick/pfsense-wol": "dev-master"
}
}
Then run composer install, (*4)
Using Git submodules
git submodule add https://github.com/phillipsnick/pfsense-wol.git
Usage
$service = new \Pfsensewol\Wol(array(
'https' => true,
'pfsense' => 'pfsense.hostname',
'username' => 'pfSenseUsername',
'password' => 'pfSensePassword'
));
$service->send('MacAddress', 'opt4');
Or see example inside Examples/SingleHost.php, (*5)
Notes
This has only been tested using pfSense 2.1, included are the necessary checks to work with the CSRF protection., (*6)
Feel free to help improve this!, (*7)