QNAP as UPS slave to another NUT Server

Printers, HDDs, USB/eSATA drives, 3rd-party programs
theTrebleClef
Starting out
Posts: 19
Joined: Wed Jun 10, 2015 12:05 pm

Re: QNAP as UPS slave to another NUT Server

Post by theTrebleClef »

moody_blue wrote: Sun Jan 29, 2023 11:04 pm I don't consider this to be a security risk. I've never explored NUT extensively but I think that nut clients have restricted priviledges and "harmfull" commands can only be issued by the nut server. It may be a problem if there are other machines imposing their credentials.

Firewalls can probably be used to restrict who can access the nut server if needed.
I'm not sure. In other clients you can run upscmd -l ups@host and it will list out instant commands available to the client. My NAS doesn't have upscmd but if somehow the NAS become compromised at this point I'm not sure what level of capability would be there apart from being an admin, and again - this would require changing the credentials on every other NUT client to match QNAP. That doesn't seem like a good practice.

I just went over NUT's FAQs and found a section about proxying a NUT server using a dummy-ups driver - and also a section on cloning a drive for some clients to use. I'm going to try one of those and see if I can add a "fake" QNAP UPS without modifying any other NUT client.

EDIT: I adjusted the ups.conf file on my NUT server to be:

Code: Select all

[tripplite]
        driver = tripplite_usb
        port = auto
        desc = "Tripp Lite SMART1000RM2U"
        vendorid = 90ae
        productid = 0001

[qnapups]
        driver = dummy-ups
        port = tripplite@localhost
        desc = "Tripp Lite SMART1000RM2U"
This apparently was enough... the QNAP NAS can now see the NUT server. The UI shows the manufacturer, model, and battery capacity. I'm sort of surprised that this worked without needing to setup the user properly, but this is a step in the right direction.
User avatar
Toxic17
Ask me anything
Posts: 6469
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: QNAP as UPS slave to another NUT Server

Post by Toxic17 »

posted this several years back if its of any use: viewtopic.php?f=151&t=47493&p=213186#p213186
Regards Simon

Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
User avatar
graemev
Know my way around
Posts: 199
Joined: Sun Feb 12, 2012 10:17 pm

Re: QNAP as UPS slave to another NUT Server

Post by graemev »

OneCD wrote: Sun Jan 29, 2023 9:19 am
theTrebleClef wrote: Sun Jan 29, 2023 9:12 am
graemev wrote:So I'll make a cry for help to @OneCD. The file /etc/config/ups/upsmon.conf has ...
Oops, I must have missed this. :'

May I ask: is the problem the hardwired credentials and UPS name assigned by QTS? You'd like to be able to change these?
Hi @OneCD . I was the guy being quoted (and I also missed this thread update) ...the original post was
viewtopic.php?f=182&t=161060

As you can see there the GUI simply asks for an IP address, but the generates:


Code: Select all

MONITOR qnapups@xxx.yy.zzz.aaa 1 admin 123456 slave
So what I was looking for was a way to configure the name qnapups it's hardwired somewhere. Right now any network configuration that has a QNAP in it is forced to use the name qnapups . There are the obvious security issues of hardcoded username but also if any other equipment has a similar limitation, e.g. the userid must be HDS or APC then the two could not work.
cralwalker
Starting out
Posts: 22
Joined: Fri Sep 04, 2015 8:40 pm

Re: QNAP as UPS slave to another NUT Server

Post by cralwalker »

Is there a conclusion to this thread?

I run a NUT UPS monitoring server on a Raspberry Pi.
On my QNAP I set the UPS choice to 'Network UPS slave', with the IP adress to my Raspberry Pi.

I am not receiving UPS information on the QNAP page. What more configurations are required?
A suggestion to configure the NUT UPS monitoring server to use the default QNAP user and password configuration.. is that it?
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: QNAP as UPS slave to another NUT Server

Post by FSC830 »

Yes, the nut slave at QNAP is hardcoded to this credentials.
Just check and try.
Me too running a NUT server at another device and configured the QNAP as UPS slave with these settings.

Regards
User avatar
graemev
Know my way around
Posts: 199
Joined: Sun Feb 12, 2012 10:17 pm

Re: QNAP as UPS slave to another NUT Server

Post by graemev »

Indeed, sadly, hardcoded. The long version is here:

viewtopic.php?f=182&t=161060
Post Reply

Return to “Hardware & Software Compatibility”