NUT: shutdown LAN machines in the event of a power failure.

  • I have a pfSense machine protected by an UPS APC SU1000 iNet (serial port version).

    I managed to install NUT in the pfSense box and it's working flawlessly. During a power outage, NUT correctly sends the shutdown signal to the pfSense box.

    Do I have any chance to send the shutdown signal to all the computers in my small LAN? (Windows, MacOS and Ubuntu machines).

  • That should be possible, but how do you connect your LAN computers to the UPS?

  • Is it possible to send the halt signal via Ethernet?

  • @panz:

    Is it possible to send the halt signal via Ethernet?

    Yes that is the general idea of NUT UPS.

    Are the LAN workstations also being powered from the UPS?
    Do you have all network equipment in the path between the firewall and the LAN workstations also fed by UPS power?

    Unless you answer yes to both of those questions, the "halt signal" will never be received by the LAN Workstations.

  • YES!  :)
    YES!  :)

  • So, how do I trigger that signal?

  • @panz:

    So, how do I trigger that signal?

    I haven't put this in practice, but theoretically you could modify pfSense's shutdown script to send the shutdown command via SSH. At least, that's what I was planning to figure out once I have a UPS, but I'm not that well versed in *nix commandline stuff.

  • Just read NUT documentation.

    pfSense 's NUT web gui doesn't cover all the options, but I guess you could modify the config file generated to include your options.

  • So, pfSense NUT as master and other machines as slave(s). I fear to do modifications to system scripts  :'(

  • I've done this the other way round.

    Using the out of the box apc powerchute software on windows.

    That can trigger a batch file to run what ever you put it in.

    So my setup was the use plink.exe to ssh into pfsense and run shutdown command on that box.  The rest of my windows batch file would then shutdown my windows clients using the default windows "shutdown" command line.

    I'm at work right now but if I can find my windows batch file I'll post it's contents.


  • I need to shutdown a FreeNAS 9.2 machine (this box is not in the UPS room; pfSense box is).

    NUT master / slave is the way to go, but I'd like not to make a mess with scripts. Is there a way to accomplish this via GUI?

  • Rebel Alliance Developer Netgate

    Since that system is FreeNAS perhaps you have another option:

    mount a NAS share on pfSense, have nut touch a flag file that triggers FreeNAS to shut down when present. (e.g. a cron job with a script that checks every minute, if it's seen, rm the file and issue a shutdown -p)

  • I am trying to do the same thing and then you lost me at mounting a share with PfSense.
    I have a PfSense machine (obviously) and a freenas box and I've been trying to get either my freenas box to read the snmp card in my UPS (Tripplite SU2200RTXL2U) or even the serial cable but all I get is unable to communicate or UPS on battery.
    So now I'm trying to see if I can get my firewall to tell my NAS box to shut down when on battery.
    Anyone had any luck?

  • To panz and Visseroth, this will answer questions for you guys. I'm also working on getting this configured for my pfSense box & UPS. I have heavily read the documentation at

    It contains lots of useful information on how to configure this tool. You will need to do some reading to make it work for your exact application, but the program seems very well built to cover a wide range of scenarios.


    Do I have any chance to send the shutdown signal to all the computers in my small LAN? (Windows, MacOS and Ubuntu machines).

    Ok, refer to the documentation for more info but upsd is a network server daemon (running on main pfSense/NUT setup) that makes battery info available over IP network to other computers (setup as slaves, on the client end) that have setup upsmon (a client for *nix/BSD). In Windows there is a tool called WinNUT that is suppose to receive battery info from upsd. I can't say anything about how to send info to Macs. Mabye google NUT upsmon Mac client to try to locate one.

    For instance with my setup. I have 8 UPS, with 1 server on each. I have all the serial ports ran to my pfSense box with two 4 port rs232 serial to usb hubs. My pfSense box will monitor all batteries for life & send appropriate shutdown signals out to be received via upsmon (for *nix/BSD) or WinNUT (in Windows).

    Pretty good info about some NUT stuff at this link too,

    Edit:As someone else already mentioned, your pfSense box with NUT & switch(es) need to be plugged into UPS as well to transmit signals over IP. Switches shouldn't matter if they hard shut off.

    More good info,

  • It was easier than I thought: pfSense now needs a Port Forward from LAN to

    Now works like a charm :)

Log in to reply