# NUT server from ipfire appliance

**URL:** <https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284>\
**Category:** Add-Ons\
**Created:** [28 January 2023 18:49 UTC](https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284 "2023-01-28T18:49:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philc](https://community.ipfire.org/user_avatar/community.ipfire.org/philc/32/7670_2.png) [@philc](https://community.ipfire.org/u/philc)\
**Post date:** [28 January 2023 18:49 UTC](https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284/1 "2023-01-28T18:49:44Z")

</div>

Hi. I’m setting up my ipfire appliance, and I’ve got networking, interfaces, etc. all set up and running. Hooray! Now on to the more complicated stuff… I want my ipfire appliance to be the server for NUT, broadcasting on all interfaces (blue, green and orange). I have the NUT service installed and running, and from the ipfire console everything looks good. I have it set as mode=netserver, but when it hit it from my client (upsc [cyberpower@192.168.10.1](mailto:cyberpower@192.168.10.1), (IP is the ipfire IP for green), I get connection failure: connection refused. Anyone have any ideas what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![raffe](https://community.ipfire.org/user_avatar/community.ipfire.org/raffe/32/15847_2.png) [@raffe](https://community.ipfire.org/u/raffe)\
**Post date:** [28 January 2023 20:00 UTC](https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284/2 "2023-01-28T20:00:46Z")

</div>

Here are some of my settings:

> [@NUT & UPS, howto shut down client after 2 min on battery?](https://community.ipfire.org/t/nut-ups-howto-shut-down-client-after-2-min-on-battery/9096):
>
> Hi! Some systems I have take some time to shut down, so I would like them to shut down if the UPS have been on battery for 2 minutes. That include my primary ipfire. Internet has told me that SHUTDOWNCMD “/sbin/shutdown -h +0” in /etc/nut/upsmon.conf will execute when the UPS is both OB (on battery) and LB (Low battery). Like in [wiki.ipfire.org - Detailed NUT Configuration](https://wiki.ipfire.org/addons/nut/detailed) where it says “SHUTDOWNCMD “/sbin/shutdown -h +0” this command will be triggered if UPS sends the BL (Battery Low) flag.…

---

<div class="post-metadata">

**Author:** ![philc](https://community.ipfire.org/user_avatar/community.ipfire.org/philc/32/7670_2.png) [@philc](https://community.ipfire.org/u/philc)\
**Post date:** [29 January 2023 12:48 UTC](https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284/3 "2023-01-29T12:48:35Z")

</div>

Thanks so much for replying. I’m not even that far…I can’t get other devices to receive the status from the ipfire NUT server. Can you?

---

<div class="post-metadata">

**Author:** ![philc](https://community.ipfire.org/user_avatar/community.ipfire.org/philc/32/7670_2.png) [@philc](https://community.ipfire.org/u/philc)\
**Post date:** [29 January 2023 13:37 UTC](https://community.ipfire.org/t/nut-server-from-ipfire-appliance/9284/4 "2023-01-29T13:37:25Z")

</div>

I got it working. For future users who find this, I’ll be honest: I don’t know exactly what I did to make it work, so I’ll tell you everything I did.

You must access your ipfire via the console to make these changes. This also assumes you’ve already successfully configured your ipfire to a USB connected ups.

1. In ipfire, in the upsd.conf file, ensure you are listening on both the local loopback AND the gateway address with the port:  
LISTEN 127.0.0.1 3493  
LISTEN 192.168.10.1 3493 (my gateway for green is 10.1. I have not yet tried to see if I can access from blue or orange, or if I need to also add those gateways)
2. In ipfire, in the upsd.users file, configure a user for the client device, where clientuser is the name of the user you want to configure, and clientpassword is the password you want to use:  
[clientuser]  
password = clientpassword  
upsmon secondary
3. On your client, in the upsd.users file, configure the same user as in #2.
4. On your client, in the upsd. conf file, ensure you are listening on the gateway IP address in #1.  
LISTEN 192.168.10.1 3493.
5. Reboot your ipfire and then your client (restarting the services without a reboot fell into the too hard category for me…)
6. To test config, on the client, run the following command, where ups is the name of your ups that you used in the ups.conf file (previously configured), and the IP address is the IP address you put in your LISTEN command in #1:  
upsc [ups@192.168.10.1](mailto:ups@192.168.10.1)  
A successful test will return a whole load of gibberish about your ups. An unsuccessful test will be obvious.
