pfSense 3.0 and REST API
-
Re: Rest- Open Api
I'm just looking for an update on this. The reason being is I have a Home Assistant server on my LAN and my TV is on a sperated subnet. Using the WoL from HA isn't possible as pfSense doesn't route L2 packets between subnets. So having pfSense with a REST API would be great as I could configre a script to use ssh and get pfSense to use it's native WoL service to wake up the TV>.
-
You can specify an IP address.
pi@homebridge:/var/homebridge/cmd4 $ wakeonlan --help
/usr/bin/wakeonlan version 0.41 calling Getopt::Std::getopts (version 1.11 [paranoid]),
running under Perl version 5.24.1.Usage: wakeonlan [-OPTIONS [-MORE_OPTIONS]] [--] [PROGRAM_ARG1 ...]
The following single-character options are accepted:
With arguments: -p -i -f
Boolean (without arguments): -h -vOptions may be merged together. -- stops processing of options.
Space is not required between options and their arguments.For more details run
perldoc -F /usr/bin/wakeonlan
[Now continuing due to backward compatibility and excessive paranoia.
See 'perldoc Getopt::Std' about $Getopt::Std::STANDARD_HELP_VERSION.]
Usage
wakeonlan [-h] [-v] [-i IP_address] [-p port] [-f file] [[hardware_address] ...]Options
-h
this information
-v
displays the script version
-i ip_address
set the destination IP address
default: 255.255.255.255 (the limited broadcast address)
-p port
set the destination port
default: 9 (the discard port)
-f file
uses file as a source of hardware addressesSee also
wakeonlan(1)pi@homebridge:/var/homebridge/cmd4 $ wakeonlan -i 172.16.2.10 0:11:32:4c:81:69
Sending magic packet to 172.16.2.10:9 with 0:11:32:4c:81:69
pi@homebridge:/var/homebridge/cmd4 $ -
Where 172.16.2.10 is the wol target or pfSense interface address?
I had assuemed the target but I've seen some odd solutions to this.
-
@stephenw10 it’s my synology nas ip address and i’m running the wol command from my homebridge server on 172.16.4.0/24.
-
Nice!
-
So let me get this straight. you have your HA on your NAS runhning Docker and you have a pi that does your network bridge then you just have a Rule on your PfSense that allows traffic from LAN to IoT net?
-
Nope I have homebridge running on a raspberry pi running ubuntu on my iot lan.
The rule is to pass allow udp port 9 from my homebridge server on the iot lan to all my subnets.