[筆記] pfSense NUT 設定教學 - Network UPS Tools 完整配置指南
No Comments

更新於 2025-12-25 19:13:08

由於 UPS 的設定比較麻煩,這篇文章作為筆記紀錄目前的設定,預防未來忘記怎麼設定 NUT 服務。

安裝第三方 Package

設定

從「服務」找到 UPS 後,點 UPS Settings 開始填入配置。

我目前是 Local USB 的狀態,讓 UPS 透過 USB 線直連 pfSense。

品牌則是 Cyberpower CP1500PFCLCDa TW,這邊驅動選 usbhid,vendorid 則是 0764,僅限我這款 UPS 是這樣,其他的型號,可能需要透過 lsusb 之類的方法查到 VID 為多少。

在我的例子中,interruptonly 這個詞在 pfSense 版本 2.8.1 後必須要加入,否則無法正常運作。


port = auto
vendorid = 0764
interruptonly

upsmon.conf


DEADTIME 15
POWERDOWNFLAG /var/run/nut/killpower

ups.conf


maxretry = 99999
debug = 9

upsd.conf


LISTEN 0.0.0.0 3493

upsd.users

建立 NUT 使用者帳號,以便其他需要監測 UPS 的服務能夠連線上這台 NUT 伺服器。


[upsuser]
  password = MY_SECRET_PASSWORD
  upsmon master

完成

之後可以看到目前 UPS 的電量、剩餘時間等狀態,之後就可以設定 NAS 上的 UPS 服務或個人電腦的 UPS 監測服務。

By Weil Jimmer


This entry was posted in General, Experience, The Internet, Note, OpenWrt, Tools By Weil Jimmer.

About Weil Jimmer

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.
More Details About Me : https://weils.net/profile.php


Leave a message.

Only the first 10 comment will show.