SOLVED (Updated for 2.3.2_RELEASE, nut 2.7.4) My notes from setting up remote/slave UPS configuration

Status
Not open for further replies.

hansmuff

Dabbler
Joined
Mar 13, 2015
Messages
22
Setup:
One machine on 192.168.1.1 running pfsense and nut, with nut configured and running
One machine on 192.168.1.98 running freeNAS 9.3

Problem:
I wanted the freeNAS machine to be able to read the UPS status over the network.
No matter what I entered on the freeNAS UPS configuration, it could not connect to the pfsense nut server.

Solution:
Two items have to be configured that I hadn't thought of: the user and the listen port

1. The user is the user/password you enter on the UPS config on freeNAS. I think it defaults to upsmon/upsmon. However, that's not necessarily a user the remote nut server will accept.

so on the pfsense box, I looked at upsd.users:
[monuser]
password = nut1119e1ea1e111
upsmon master

So the username is "monuser" and the password "nut1119e1ea1e111". Those are you user/password values for the UPS config on FreeNAS.

2. By default, on the pfsense box, the nut server "listens" for connections only on networks declared in upsd.conf. In my case, this is what was in there:
LISTEN 127.0.0.1
LISTEN ::1

That's problematic when my home network is on 192.168.1.0/24 because nut will not listen there. So I added this line to upsd.conf:
LISTEN 192.168.1.1

And voila. On the freeNAS command line, I can now see the remote UPS:

[root@freenas] /# upsc -l 192.168.1.1
cp1500

(cp1500 is the ups name I picked in pfsense.)

Maybe this will save someone from ripping their hair out.

Here are the settings for freeNAS:
"UPS Settings"
UPS Mode "Slave"
Identifier "cp1500" (same name used in pfsense config)
Remote host "192.168.1.1"
Remote port "3493"
Description "whatever"
Shutdown mode "UPS reaches low battery"
Shutdown timer "30"
Monitor user "monuser"
Monitor password "nut1119e1ea1e111"
(then email setup)

Settings for pfsense, where the UPS is hooked up via USB:
Only listing relevant settings:
UPS Monitoring "Local UPS"
Local UPS name "cp1500"
Local UPS Model "Tripp-Lite AVR USB" (it's actually a CyberPower CP1500PFCLCD but only this driver works)
Local UPS Port "auto (USB only)"
The rest is all defaults.

If you have this setup with pfsense driving nut (heh), you can also just add the LISTEN line into the GUI configuration free form entry field for upsd.conf. That way your pfsense config backup will contain it.
 

Jeremy Foor

Dabbler
Joined
Dec 8, 2015
Messages
10
Just wanted to say thanks for writing this up..just used it to configure the reverse of yours. Have my Eaton UPS connected to FreeNAS as my master with my pfsense box as the slave. Had to go in and edit the listen interfaces in upsd.conf.

Thanks!
 
Status
Not open for further replies.
Top