每月彙整:二月 2023

CyberPower

1.範例:安裝對應版本1000va https://www.cyberpower.com/tw/zh/product/sku/cp1000avrlcda#downloads 2.dbkg -i cyberpower.deb 3.查看 pwestat -status 4. show pwestat-config 他的shll都在 /etc/sh下 hibernate.sh 休眠 pwrstatd-email.sh 樣板 pwrstatd-lowbatt.sh 低電量執行 shutdown.sh 設定檔 /etc/pwrstatd.conf Power Failure 停電事件 powerfail-delay = 60 0~3600秒 延遲n秒後,執行 script、shutdown powerfail-active = yes yes | no 允許執行 script powerfail-cmd-path … 繼續閱讀 →

發表於 未分類 | 發表迴響

mikrotik knock door

#knock door_官方 /ip firewall filter add action=add-src-to-address-list address-list="port:9000″ \ address-list-timeout=1m chain=input dst-port=9000 protocol=tcp add action=add-src-to-address-list address-list="secure" address-list-timeout=1m \ chain=input dst-port=6000 protocol=tcp src-address-list="port:9000″ add chain=input src-address-list=secure action=accept add action=drop chain=input #knock door / ip firewall filter add chain=input protocol=tcp dst-port=1337 action=add-src-to-address-list … 繼續閱讀 →

發表於 ros | 發表迴響

mikrotik dhcp 偵測警告

if ($leaseActIP = "192.168.100.254″) do={ :log info "IP: $leaseActIP, MAC: $??leaseActMAC, Host: $"lease-hostname"" :tool e-mail send to= MIS@MISMAIL.COM subject="Violation alert!!! 網絡中有新的 DHCP 客戶端" body="MAC: $??leaseActMAC, IP: $leaseActIP, Host: $"lease-hostname", $leaseBound" }

發表於 ros | 發表迴響

mikrotik 黑名單更新 script

#https://ros6.com/?action=tags&item=%E8%84%9A%E6%9C%AC :do [/tool fetch url="https://cache-1.oss-cn-beijing.aliyuncs.com/file/scaners.rsc" dst-path=scaners.rsc check-certificate=yes] :delay 10s :if ([/file find name="scaners.rsc"] != "") do={ /ip firewall address-list remove [find list="scaners"] ###若需要加载到FLASH则注释掉下行代码,若需要加载到RAM则反之。### #:global ipt 30d :delay 2s /imp scaners.rsc :delay 5s /file remove [find name="scaners.rsc"] :log warning "扫描者黑名单更新完成"}

發表於 未分類 | 發表迴響

adguard home 白名單

過濾器–自定規則 @@||網址^$important ex: @@||optimizationguide-pa.googleapis.com^$important

發表於 未分類 | 發表迴響

samba 開啟 smbv1

+上nt這一段 server max protocol = NT1 下面註解# #server min protocol = SMB2_02 #server max protocol = SMB2_24

發表於 linux | 發表迴響

wireguard-on and off

/interface wireguard enable 0 /interface wireguard disable 0 #分別停用及啟用 後面數字 代表第幾條規則 /interface wireguard peer enable 0 /interface wireguard peer disable 0 #分別 peer 停用及啟用 後面數字 代表第幾條規則 ——————————– #https://blog.spaps.de/mikrotik-routeros-wireguard-dynamic-dns-endpoint-refresh/ 或 #https://forum.mikrotik.com/viewtopic.php?t=182340 使用一個腳本來檢查對等端點地址是否仍然與 dns 名稱匹配,如果不匹配,則更新到 DNS 名稱的最新 ip 地址。 :local wgPeerComment :local … 繼續閱讀 →

發表於 ros | 發表迴響