pfsense_fauxapi icon indicating copy to clipboard operation
pfsense_fauxapi copied to clipboard

Wake On LAN via fauxapi

Open bdf0506 opened this issue 5 years ago • 0 comments

I am struggling to get the function_call for WakeOnLan to work with FauxAPI.

I'm able to use the exec_command and wake that way, but that gives the API user too much access that I do not want. This works and sends a WOL packet fine:

fauxapi --host pfsense --apikey **** --apisecret ***** function_call "{\"function\": \"exec_command\", \"args\": \"wake igb1.20 78:5d:c8:ee:ff:aa\"}"

This below function_call using the WakeOnLan function does not work, though everything appears that it should work. fauxapi --host pfsense --apikey **** --apisecret ***** function_call "{\"function\": \"WakeOnLan\", \"args\": [\"192.168.20.255\", \"78:5d:c8:ee:ff:aa\"]}"

The FauxAPI logs even show that it processed the command and sends a magic packet, but I don't see it actually sending a magic packet.

Jul 26 10:02:51 pfSense php-fpm[61319]: {"INFO":"20200726Z100251 :: fauxapi\\v1\\fauxApi::__call","DATA":{"user_action":"function_call","callid":"5f1d8d0bc9ba9","client_ip":"192.168.30.203"},"source":"fauxapi"}
Jul 26 10:02:51 pfSense php-fpm[61319]: /fauxapi/v1/index.php: Magic Packet sent () to (192.168.20.255) MAC=78:5d:c8:ee:ff:aa

Any ideas?

bdf0506 avatar Jul 26 '20 14:07 bdf0506