• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

pfSense 3.0 and REST API

Scheduled Pinned Locked Moved General pfSense Questions
7 Posts 3 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    franky29
    last edited by May 3, 2020, 7:48 PM

    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>.

    1 Reply Last reply Reply Quote 0
    • N
      NogBadTheBad
      last edited by NogBadTheBad May 3, 2020, 8:06 PM May 3, 2020, 8:05 PM

      You can specify an IP address.

      Screenshot 2020-05-03 at 20.52.19.png

      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 -v

      Options 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 addresses

      See 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 $

      Andy

      1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by May 3, 2020, 8:18 PM

        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.

        N 1 Reply Last reply May 3, 2020, 8:30 PM Reply Quote 0
        • N
          NogBadTheBad @stephenw10
          last edited by NogBadTheBad May 3, 2020, 8:31 PM May 3, 2020, 8:30 PM

          @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.

          Andy

          1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

          1 Reply Last reply Reply Quote 1
          • S
            stephenw10 Netgate Administrator
            last edited by May 3, 2020, 8:31 PM

            Nice!

            1 Reply Last reply Reply Quote 0
            • F
              franky29
              last edited by May 3, 2020, 8:32 PM

              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?

              1 Reply Last reply Reply Quote 0
              • N
                NogBadTheBad
                last edited by NogBadTheBad May 3, 2020, 8:37 PM May 3, 2020, 8:34 PM

                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.

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received