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

    UPS & NUT strategy

    General pfSense Questions
    4
    15
    1.9k
    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.
    • Z
      zkab
      last edited by zkab

      I have following in my LAN:

      1. APC SmartUPS (snmp)
      2. pfSense
      3. 2 Synology NAS
      4. Home Assisstant (Raspi)
      5. Unifi Cloud key
      6. Linux & Windows workstations

      Right now I have configured one of the NAS to act as NUT server and
      it works OK with Home Assisstant.
      I haven't install NUT on pfSense yet and this is the crucial issue.
      When NUT server on NAS shuts down (power lost) its clients I guess it must shutdown
      pfSense last or otherwise the IP addresses to the clients are gone.

      Is it better to install the NUT server in pfSEnse and all the others will be NUT clients ...
      or should I install NUT server in a stand alone box (raspi) and treat all devices as NUT clients ... including pfSense?

      My experience is limitied in this field and appreciate guidlines how to proceed.

      dennypageD 1 Reply Last reply Reply Quote 0
      • dennypageD
        dennypage @zkab
        last edited by

        @zkab If the UPS is SNMP based, it is best to have any device that is capable monitor the UPS directly. Most of the devices you list (pfSense, Synology, Linux) are easily capable of direct monitoring with NUT via SNMP. I think Windows as well, but I don't have direct experience.

        dennypageD 1 Reply Last reply Reply Quote 0
        • dennypageD
          dennypage @dennypage
          last edited by

          @dennypage One other note: Be sure to use a fixed IP address for the UPS, and the clients should refer to the UPS by IP address rather than by hostname.

          Z 1 Reply Last reply Reply Quote 0
          • Z
            zkab @dennypage
            last edited by

            @dennypage Thanks for you input.
            Yes ... I have already fixed IP:s and references are also made with fixed IP:s
            Do I understand you right that I should use a dedicated computer as NUT server and all other LAN devices will be NUT client to that server.
            Do I think correctly that there shold be an ranking order to shut-down the clients?
            What I mean is that pfSense (router) is providing IP:s to my LAN and should be the last NUT client to shut-down so I don't loose any IP:s ... how to fix that ranking order I am not sure

            AndyRHA dennypageD 2 Replies Last reply Reply Quote 0
            • AndyRHA
              AndyRH @zkab
              last edited by

              @zkab DHCP leases last for a period time you set, not just when the DHCP server is up.

              o||||o
              7100-1u

              Z 1 Reply Last reply Reply Quote 0
              • Z
                zkab @AndyRH
                last edited by

                @andyrh WOW ... that solved my problem with ranking order.
                I checked with pfSense ... the default lease time is 7200 seconds
                So I can shut-down DHCP server and still be able to access fixed IP:s for 7200 seconds ...

                1 Reply Last reply Reply Quote 0
                • dennypageD
                  dennypage @zkab
                  last edited by

                  @zkab said in UPS & NUT strategy:

                  @dennypage Thanks for you input.
                  Do I understand you right that I should use a dedicated computer as NUT server and all other LAN devices will be NUT client to that server.

                  No. Each host should run its own NUT server talking directly to the UPS via SNMP. When using SNMP, the should UPS control the shutdown, not the NUT server. See the NMC documentation for info on configuring the UPS.

                  Z 1 Reply Last reply Reply Quote 0
                  • Z
                    zkab @dennypage
                    last edited by

                    @dennypage Something is wrong.
                    I installed NUT in pfSense and configured it with SNMP remote but it can't connect to my UPS.
                    Do I have to set up a firewall rule for my UPS?

                    Z 1 Reply Last reply Reply Quote 0
                    • Z
                      zkab @zkab
                      last edited by

                      @zkab I followed guidelines in https://techexpert.tips/pfsense/pfsense-snmp-configuration/ but no success.
                      Can't access UPS from pfSense ...

                      1 Reply Last reply Reply Quote 0
                      • dennypageD
                        dennypage
                        last edited by

                        @zkab That is a really old link, about setting up an SNMP server rather than accessing an SNMP UPS.

                        For NUT package info, see this link

                        Z 1 Reply Last reply Reply Quote 1
                        • Z
                          zkab @dennypage
                          last edited by zkab

                          @dennypage I followed the link you suggested ... still don't get it right.

                          What I have is a APC SmartUPS (snmp) with IP 192.168.1.12
                          At APC I have created a user=apc & passwd

                          I also created a Comminity strig in APC which I enter in pfSense/Services/SNMP
                          So where have I missed?
                          status.png snmp.png settings.png

                          dennypageD 1 Reply Last reply Reply Quote 0
                          • dennypageD
                            dennypage @zkab
                            last edited by

                            @zkab The SNMP service (Services -> SNMP) has nothing to do with trying to use an SNMP based UPS. Unless you are using SNMP for monitoring of pfSense itself, you should disable that.

                            Is the SNMP configuration of the UPS using “public” as the read only community? And is v1/v2c enabled in the UPS? You can/should confirm the ability to access the UPS with snmpwalk.

                            The additional lines for upsd.users are for remote access to upsd from another NUT client. Unless you are actively using remote NUT clients pointing at your pfSense server, you should remove them.

                            Z 1 Reply Last reply Reply Quote 0
                            • Z
                              zkab @dennypage
                              last edited by

                              @dennypage OK ... I disabled SNMP in pfSense
                              In APC UPS I don't have public community - have entered my own community string (read-only)
                              Running SNMP v1

                              Synology NAS have the option to acct as a UPS server.
                              I tested it and it worked perfectly towards my APC UPS.
                              I can even interface Home Assistant (HA) -> NAS -> APC UPS (check HA pic below)

                              Strange that Synonlogy can access my APC UPS and display information about the device but pfSense can't.
                              With my limited knowledge this indicates that configuration of APC should be OK but not pfSense

                              HA.png

                              dennypageD 1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                The NUT service is not even running in your screenshots there. I would assume you have a config error that prevents it starting. Try to start the service then check the logs.

                                Steve

                                1 Reply Last reply Reply Quote 0
                                • dennypageD
                                  dennypage @zkab
                                  last edited by dennypage

                                  @zkab said in UPS & NUT strategy:

                                  @dennypage OK ... I disabled SNMP in pfSense
                                  In APC UPS I don't have public community - have entered my own community string (read-only)
                                  Running SNMP v1

                                  Go back and make the ro community “public”. You can use a different community later, but for now stay with public.

                                  Edit: And please confirm functionality with snmpwalk before attempting anything else:

                                  snmpwalk -v 1 -c public 192.168.1.12
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.