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

Remote UPS shutdown & pfSense.

Scheduled Pinned Locked Moved General pfSense Questions
5 Posts 5 Posters 11.7k 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.
  • M
    mrzaz
    last edited by Dec 11, 2005, 12:22 AM

    Hello,
    I'm running pfSense as main router and have a question if someone could point
    me in the right direction for a suitable solution.

    I'm running a small Win-based PC (with mailserver,web,ftp)  + APC SmartUPS XL
    with PowerShute SW and a separate PC working as router with pfSense.

    Today, the PowerShute software takes care of shutting down the server
    in case of powerloss, but don't have any good tool for shutting down the
    pfSense machine.
    As i'm not so into FreeBSD as such, I have a bit of a problem to find
    a suitable solution to remotely inititate a shutdown of pfSense machine
    from the Win machine.

    As normal SSH-client does not allow to send password on the commandline
    and also you get a menu-based shell, I have a bit of a problem to
    find a working solution.

    Does anyone on this forum have a working solution for this
    kind of scenario ?

    The PowerShute application has a function to run additional
    shutdown activities from commandfile, this would be the suitable
    place to issue a shutdown of the pfSense machine but I don't
    know how to do it in a robust way.

    I'm a private person, running my own small system
    that is non-commercial.

    Best regards
    Dan Lundqvist
    Stockholm, Sweden

    1 Reply Last reply Reply Quote 0
    • C
      colin_
      last edited by Dec 22, 2005, 7:38 AM

      You may want to look at running a master/slave setup with apcupsd. This would allow you to send a signal to the pfSense or Windows system from the UPS controller and shut everything down.

      There appears to be a solid apcupsd port available for Windows, and a pfSense package should show up shortly.

      1 Reply Last reply Reply Quote 0
      • B
        billm
        last edited by Dec 29, 2005, 7:42 AM

        You can always use ssh authorized keys (and commands).  Beware that upgrades may wipe out your key and this is obviously unsupported.

        –Bill

        pfSense core developer
        blog - http://www.ucsecurity.com/
        twitter - billmarquette

        1 Reply Last reply Reply Quote 0
        • E
          Emab
          last edited by Aug 22, 2007, 12:19 PM

          @billm:

          You can always use ssh authorized keys (and commands).  Beware that upgrades may wipe out your key and this is obviously unsupported.

          –Bill

          I' want to do the same thing… I'd like to shut down the pfSense pc by a SSH command...
          But the problem is...How to bypass the console menu?

          1 Reply Last reply Reply Quote 0
          • C
            Cry Havok
            last edited by Aug 22, 2007, 8:20 PM

            I have the following in /etc/rc.initial, just before the line /etc/rc.banner:

            REMOTE_IP=`echo ${SSH_CLIENT} | awk '{ print $1 }'`
            if [ "${REMOTE_IP}" = "10.11.12.13" ]; then    
                    /bin/tcsh
                    exit && exit && logout
            fi
            
            

            Replace 10.11.12.13 wit h the IP of the system you want to be able to bypass the menu.

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