NUT package (2.8.0 and below)
-
Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?
Yes to all. This is what NUT does for a living.
By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level–around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.
-
Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?
Yes to all. This is what NUT does for a living.
By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level–around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.
Awesome sauce! Thanks for tolerating my stupidity :P
-
The PR for the NUT package has been merged, but the PR for mainline pfSense is still pending review/testing.
Both PRs now merged. Note that both a new version of pfSense (presumably 2.4.3) and a new version of the NUT package (2.7.4_6) are required for power kill to function.
-
Ok, I think I broke it. I have two identical units (CP850PFCLCD), and both of them work with my Windows system but neither work with the firewall. So here's my settings:
And this is all it does:
Am I missing something obvious?
-
Hey dtallon13,
Have you rebooted pfSense since you first installed NUT? If you have not, there is a USB permissions problem that may be tripping you up. Just leave the UPS connected via USB, and reboot the firewall.
If a reboot doesn't address the issue, then check the system log (Status / System Logs / System / General) for messages matching 'nut' or 'ups' and report back what you find please.
-
Where can I find example for power kill function?
-
@w0w:
Where can I find example for power kill function?
There isn't anything you will have to set up or code. It will be automatic with the new version of the NUT package and the new version of pfSense.
-
Anyone know how to get NUT to accept incoming connections?
I tried adding:
LISTEN 192.168.1.5
in upsd.conf, however that seems to cause nut to freeze and any page in the webui with NUT goes nuts (pun intended). I had to restore from a backup config to get things working again.
-
Anyone know how to get NUT to accept incoming connections?
Covered earlier in this thread. See reply 1.
-
-
Hey dtallon13,
Have you rebooted pfSense since you first installed NUT? If you have not, there is a USB permissions problem that may be tripping you up. Just leave the UPS connected via USB, and reboot the firewall.
If a reboot doesn't address the issue, then check the system log (Status / System Logs / System / General) for messages matching 'nut' or 'ups' and report back what you find please.
Reboot worked like magic. Thanks!
-
Hello,
My NUT package displays as 2.7.4_5.
This page says there is a version 2.7.4_6 but I am offered no option to update.
What am I doing wrong?Recent changes I've made -
I was running pfSense 2.3.4x. I upgraded to 2.4.2, saved a config after checking everything was running properly.
I then did a fresh install of 2.4.2 (went with ZFS this time), then upgraded to p1 and restored from the backup config.xml.Everything went as smooth as possible. Not a single hiccup. UPS service is accurate and working.
*IF it matters, my pfSense box is a slave to my Synology DS415+ for UPS.
Thanks for any advice.
-
My NUT package displays as 2.7.4_5. This page says there is a version 2.7.4_6 but I am offered no option to update.
NUT package version 2.7.4_6 isn't offered for pfSense 2.4.2 because the changes in 2.7.4_6 require pfSense 2.4.3 or later to function. Currently, you will only see 2.7.4_6 if you are running a pfSense development snapshot.
-
Ahhh, OK. Whew! I was thinking I borked my fresh install or something didn't translate from the backup config.
Thanks for the reply. I'll sleep better tonight. ;D -
-
Hi New pfSense user. I appreciate your work on NUT, it's the first package I have installed.
I'm running pfSense on Netgate SG-3100, which I have as UPS Master. I have a QNAP T-882 as slave.
UPS is CyberPower OR700 and is connected to SG-3100 via USB.
I have configured the psSense as described in post #2, in the pfSense: Services/UPS and the UPS shows up in properly in pfSense.
Here's how I configured the NAT rule. I am still working up the learning curve on Firewall in pfSense, so please let me know if you see any issues.
I did not have to setup the remote access user as described in post 2. In post #64, there are instructions to place directives in the advanced section for ups.conf if you want to override the shutdown levels:
ignorelb override.battery.charge.low = 50 override.battery.runtime.low = 600
However, later posts (e.g. #85) say that UPS specific arguments should be entered in the section above that says "Extra Arguments to driver".
So I added like this:
After setting the Port Forward, the QNAP can now see the UPS:
Any feedback is appreciated and, hopefully this will be helpful for other new users.
-
I did not have to setup the remote access user as described in post 2.
You will want to set up a user for remote access as discussed in reply #2. The monuser in the config is intended for local use only. It is automatically generated based on a random number for security, and will change from time to time. If you set up your own user, the name and password will be under your control and will not change.
In post #64, there are instructions to place directives in the advanced section for ups.conf if you want to override the shutdown levels:
ignorelb override.battery.charge.low = 50 override.battery.runtime.low = 600
However, later posts (e.g. #85) say that UPS specific arguments should be entered in the section above that says "Extra Arguments to driver".
Reply #64 discusses pollinterval which does belong in the global section for ups.conf. The battery parameters are UPS specific, and belong in the driver section as noted in #85 and elsewhere. Your post above shows it in the correct section.
-
Thanks for the reply!
You will want to set up a user for remote access as discussed in reply #2. The monuser in the config is intended for local use only. It is automatically generated based on a random number for security, and will change from time to time.
For 'remote access', it sounds like you mean any device other than the pfSense Master? So the QNAP on the same LAN is considered remote? Sorry, it's not the context I'm used to for local/remote.
If you set up your own user, the name and password will be under your control and will not change.
So, I in adding the QNAP as a slave/user, I have read here (and elsewhere) that it only will accept admin/123456:
-
For 'remote access', it sounds like you mean any device other than the pfSense Master? So the QNAP on the same LAN is considered remote? Sorry, it's not the context I'm used to for local/remote.
Remote access in this context refers to anything not running locally on the box that the UPS is attached to.
So, I in adding the QNAP as a slave/user, I have read here (and elsewhere) that it only will accept admin/123456:
Very disappointing, but not horribly surprising. Synology does something equally stupid by hardcoding "monuser" and "secret".
-
Thanks for clarifying the remote/local definitions.
Very disappointing, but not horribly surprising. Synology does something equally stupid by hardcoding "monuser" and "secret".
I found some additional information that states you can change the username/password by editing /etc/config/ups/upsmon.conf on the QNAP (it was on my system volume).
In that file I found:
RUN_AS_USER admin MONITOR qnapups@192.168.34.5 1 admin 123456 slave ...
For now I haven't changed the configuration. Would I need to change "admin" in both lines? Since the RUN_AS_USER parameter is <userid>and the MONITOR parameter is <username>, it's unclear. Further, it appears that changing <userid>in RUN_AS_USER might cause some permission issues?</userid></username></userid>