2026/05/20

最近DNS一直出現很奇怪的問題

May 19 09:20:00 dns kernel: named[964]: segfault at 28 ip 00007f040568005b sp 00007f04006a6430 error 4 in libdns.so.1115.0.3[7f04055c1000+246000]
May 19 09:40:39 dns kernel: dnf[5632]: segfault at 10 ip 00007f8ea3a67620 sp 00007ffd82680990 error 4 in libpython3.6m.so.1.0[7f8ea38ef000+2ac000]


May 20 00:00:33 dns2 systemd-coredump[19617]: Process 884 (named) of user 25 dumped
core.#012#012Stack trace of thread 888:#012#0  0x00007f96c7b175af raise (libc.so.6)#
012#1  0x00007f96c7aeaee5 abort (libc.so.6)#012#2  0x000055b9e141fdfa assertion_fail
ed.cold.5 (named)#012#3  0x00007f96c9576e70 isc_assertion_failed (libisc.so.1107)#01
2#4  0x00007f96c95a22fa isc_task_attach (libisc.so.1107)#012#5  0x00007f96c95baa41 s
ocket_recv (libisc.so.1107)#012#6  0x00007f96ca9f7c30 startrecv (libdns.so.1115)#012
#7  0x00007f96ca9fd314 dns_dispatch_addresponse3 (libdns.so.1115)#012#8  0x00007f96c
a9fda75 dns_dispatch_addresponse2 (libdns.so.1115)#012#9  0x00007f96caac8370 resquer
y_send (libdns.so.1115)#012#10 0x00007f96caad27ab fctx_query (libdns.so.1115)#012#11
 0x00007f96caad3077 fctx_try (libdns.so.1115)#012#12 0x00007f96caad39e0 fctx_start (
libdns.so.1115)#012#13 0x00007f96c959e794 dispatch (libisc.so.1107)#012#14 0x00007f9
6c959f402 run_slow (libisc.so.1107)#012#15 0x00007f96c82101ca start_thread (libpthre
ad.so.0)#012#16 0x00007f96c7b02953 __clone (libc.so.6)#012#012Stack trace of thread
889:#012#0  0x00007f96c8216628 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0)
#012#1  0x00007f96c95bf410 isc_condition_waituntil (libisc.so.1107)#012#2  0x00007f9
6c95a51d3 run (libisc.so.1107)#012#3  0x00007f96c82101ca start_thread (libpthread.so
.0)#012#4  0x00007f96c7b02953 __clone (libc.so.6)#012#012Stack trace of thread 890:#
012#0  0x00007f96c7c081c7 epoll_wait (libc.so.6)#012#1  0x00007f96c95b483c watcher (
libisc.so.1107)#012#2  0x00007f96c82101ca start_thread (libpthread.so.0)#012#3  0x00
007f96c7b02953 __clone (libc.so.6)#012#012Stack trace of thread 887:#012#0  0x00007f
96c8216371 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)#012#1  0x00007f96c959e4d
f dispatch (libisc.so.1107)#012#2  0x00007f96c959f41f run_normal (libisc.so.1107)#01
2#3  0x00007f96c82101ca start_thread (libpthread.so.0)#012#4  0x00007f96c7b02953 __c
lone (libc.so.6)#012#012Stack trace of thread 884:#012#0  0x00007f96c7b1792e __sigsu
spend (libc.so.6)#012#1  0x00007f96c95a85fc isc__app_ctxrun (libisc.so.1107)#012#2
0x00007f96c95a92cf isc_app_run (libisc.so.1107)#012#3  0x000055b9e1420d25 main (name
d)#012#4  0x00007f96c7b03865 __libc_start_main (libc.so.6)#012#5  0x000055b9e14216de
 _start (named)

2026/05/18

pve新建guest時
如果TPM State的disk 是開在local
是不能移到別的storage上的
要移動只能備份
還原時再選目的storage



2026/05/14

之前把loki升到 3.7的時候
有發現怎麼少了很多檔案
因為都會同時升級 promtail
昨天看文件才發現 EOL了
雖然還是可以用 但總是要找別的解決方案
找到了 vector
滿多人推的
官網有rpm但可以不用裝rpm
直接下載執行檔來執行就好了
vector config 根据原來的promtail 調整如下

# 1. 定義資料來源 (對應 Promtail 的 scrape_configs)
sources:
  forti_logs:
    type: "file"
    include:
      - "/var/log/messages"
    # 對應 Promtail 的 positions.filename
    data_dir: "/vector_data" 

# 2. 處理資料與添加標籤 (對應 Promtail 的 labels)
transforms:
  add_labels:
    type: "remap"
    inputs:
      - "forti_logs"
    source: |
      .job = "forti_auth"
      .host = get_hostname!()

# 3. 定義目的地 (對應 Promtail 的 clients.url)
sinks:
  loki_output:
    type: "loki"
    inputs:
      - "add_labels"
    endpoint: "http://10.10.0.10:3100"
    encoding:
      codec: "text"
    labels:
      job: "{{ job }}"
      host: "{{ host }}"


grafana官網是建議使用 alloy
但測了一下一直有問題




2026/05/12

昨天傳給我的

有需要的自己看看吧


https://github.com/BensonRUEI/RiskVendorScan

2026/05/09

接續救檔案後的需求
再來想把檔案傳到google drive並分享
因為是遠端操作
所以打開browser後即使用關掉還是要能繼續執行
這時就要使用 xpra 
登入後要先執行
 
xpra start :100 --start=firefox

先把firefox跑在後端

再使用以下指令呼叫出來

xpra attach :100



2026/05/07

昨天有user問我

他自己把HD for了

問我檔案能不能救

但救回後檔名不是原來的

找到可以全文檢索的工具

後續應該可以省一點時間

https://docfetcher.sourceforge.io/zh/

這二天在設定 DKIM
目前的google search 預設第一筆都是AI的結果
會有設定的相關流程
但已經碰到好几次
照著做不一定會成功
這次碰到的問題是設定都照著做完了
但就是沒辦法 DKIM-Signature
最後才發現是 Mode設定的問題
opendkim有三種Mode s v 和 sv
s 是寄出加上簽章
v 是檢查來信的簽章

但預設是 v

所以才會在log裡看到

May  6 22:43:03 mail opendkim[608422]: 2532F302BB1B: not authenticated

May  6 22:43:03 mail opendkim[608422]: 2532F302BB1B: no signature data 

因為主要是寄出要簽
所以把 Mode 改成 s

Mode    s

重啟後就正常了

May  7 09:33:02 mail opendkim[679967]: 31379302BB33: DKIM-Signature field added (s=default, d=mail.bbbb.com.tw)

2026/05/02

dpanel

很方便的docker管理工具

 https://dpanel.cc/



很方便的網站管理靜態頁面

https://github.com/bastienwirtz/homer

目前碰到的問題是
target: "_blank"
沒辦法下在global
要一個一個分開下

另外 yml 檔 不能使用 tab 只能一直按空白鍵

2026/04/30

偵測web 及 組件的工具  

WhatWeb - Next generation web scanner version 0.5.5.

Developed by Andrew Horton (urbanadventurer) and Brendan Coles (bcoles)

Homepage: https://www.morningstarsecurity.com/research/whatweb


Usage: whatweb [options] <URLs>


  <TARGETs>                     Enter URLs, hostnames, IP addresses, filenames or

                                IP ranges in CIDR, x.x.x-x, or x.x.x.x-x.x.x.x

                                format.

  --input-file=FILE, -i         Read targets from a file.


  --aggression, -a=LEVEL        Set the aggression level. Default: 1.

  1. Stealthy                   Makes one HTTP request per target and also

                                follows redirects.

  3. Aggressive                 If a level 1 plugin is matched, additional

                                requests will be made.


  --list-plugins, -l            List all plugins.

  --info-plugins, -I=[SEARCH]   List all plugins with detailed information.

                                Optionally search with a keyword.


  --verbose, -v                 Verbose output includes plugin descriptions.


Note: This is the short usage help. For the complete usage help use -h or --help.

2026/04/26

手動更新 docker並重啟


#!/bin/bash

rm -f /tmp/docker_run

read -p "docker name:" docker_name

ori=$(docker ps -a --filter "name=^/${docker_name}$" --format "{{.Image}}")

docker pull $ori

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike $docker_name > /tmp/docker_run

chmod +x /tmp/docker_run

docker rm -f $docker_name

/tmp/docker_run

2026/04/22

前几天把grafana升到 13 版後

原本可以捉的圖都無法出現了

查了一下才知道 13 版 已經把  

grafana-image-renderer 的plugin 拿掉了

官方文件有提到怎麼理

https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/


2026/04/17

昨天看文章有提到 MediaMTX 這個軟体
單一檔案就可以執行
想說下載來玩玩
有几個點要注意

使用obs串流時 輸出 設定一定要修改如下 否則無法串流成功


















另外就是直接用browser 打開 使用 webrtc 時 影像沒問題 但完全沒聲音
但這時用 vlc 去開 影像聲音都沒問題
查到說是音訊編碼的問題
但srs沒有這個問題

使用如下指令推流 影音都沒問題

ffmpeg -re -i input.mp4 \
  -c:v libx264 -preset veryfast -tune zerolatency \
  -c:a libopus -ar 48000 -ac 2 -b:a 96k \
  -f rtsp rtsp://localhost:8554/live


還有一個問題就是browser打開後預設是靜音 要手動打開



使用以下指令進行螢幕擷取並串流 影音都沒問題

ffmpeg -f x11grab -video_size 1024x768 -framerate 30 -i :0.0 \
-f pulse -i default \
-c:v libx264 -preset veryfast -pix_fmt yuv420p -g 60 -bf 0 \
-c:a libopus -b:a 128k -ar 48000 -ac 2 \
-flags +global_header \
-rtsp_transport tcp -f rtsp rtsp://localhost:8554/live


obs目前還沒找到方法

2026/04/14

之前filegator docker 更新後 之前建的user都會不見
而且admin的密碼也會還原成預設

原來是少加了一個對應

-v filegator-private:/var/www/filegator/private

完整如下

docker run -d -p 9999:8080 -v filegator-data:/var/www/filegator/repository -v filegator-private:/var/www/filegator/private --name filegator --restart=always filegator/filegator:latest

2026/03/21

超級好用的docker更新工具

https://github.com/mag37/dockcheck

2026/03/10

安裝openclaw時 大模型的選單裡沒有 ollama 可以選
只能利用ollama去呼叫

ollama launch openclaw --model gpt-oss:120b-cloud

一些ollama會用到的指令

ollama ls



一些openclaw會用到的指令

openclaw plugins list

openclaw update

openclaw logs --follow

openclaw onboard

openclaw approvals allowlist 


2026/03/09

上週因為ruckus switch 的power壞了
查log時竟然查到內部攻擊者








想說能不能從vsz把user踢掉
程式如下

#!/bin/bash

#how to use

#./vsz_kick_ip ip

VSZ="https://10.1.1.1:8443"
USER="user"
PASS="passwd"

IP="$1"

#拿到cookie.txt

curl -k -c /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/session" \
  -H "Content-Type: application/json" \
  -d "{\"username\": \"$USER\", \"password\": \"$PASS\"}"

#使用cookie.txt 找出 ip 是那個 mac

MAC=$(curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/query/client" -H "Content-Type: application/json" -d '{"limit": 100000,"index": 0}'|jq|grep $IP -A 2|tail -n 1|cut -d '"' -f 4)

echo $MAC


#取出 mac 並斷線

curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/clients/disconnect" -H "Content-Type: application/json" -d '{"mac":"'$MAC'"}'

運作沒問題
但踢掉後又會馬上連線 所以沒用
本來是想再加入黑名單
但現在的無線又是隨几mac
所以感覺作用不大
再想想要怎麼處理

2026/03/05

今天要把graylog升到 7.0.5
竟然出現以下問題

file /usr/lib/.build-id/0f/5bf41e3e207feb6cab260b2366f1697c13555b conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/2a/45eebcedc9ddddd7e43512f1c1d13a625cfe52 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/32/f8130f4d86dfcf5f9af96b1cb932eda8015165 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3c/51e24cab713cbc44a4b05fed44660d7d8e4035 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3d/552045a6af8c09b554b88b43d19a50b9e52b99 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/7f/0274197caa4afcc5c5430232e140211d611a4f conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/db/dfd874aa078c8f1feacc28175a6a874c060d6a conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/e7/189286cdb1e6c44b0968f6d52855af9696ae2c conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64

都是官方的吔 沒測試就丟出來

只能直接手動下載二個rpm

https://downloads.graylog.org/el/stable/7.0/x86_64

再來

rpm -ivh --force graylog-server-7.0.5-1.x86_64.rpm graylog-datanode-7.0.5-1.x86_64.rpm


2026/03/03

還是 ollama

一開始安裝是使用 官方提供的script 裝在lxc上

curl -fsSL https://ollama.com/install.sh | sh

接下來視需求跑model

ollama run gpt-oss:20b

要看下載了那些 model

使用 ollama ls

跑起來在文字介面上可以下指令

如果需要有網頁界面

最快的方式是在同一台几器跑 open-webui 

docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main

登入後就可以選擇任何已下載的模型來使用 很方便 直接選擇就能用 不需要 先 ollma run

ollama 也有docker可以使用

https://hub.docker.com/r/ollama/ollama

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama


裝好後使用以下指令進到內部再下指令

docker exec -it ollama /bin/bash

2026/03/02

有台 CISCO UCS C240 M5S 的HD最近壞了

換新之後 smart 捉不到資料了

# smartctl -i /dev/bus/0 -d megaraid,2
smartctl 7.4 2024-10-15 r5620 [x86_64-linux-6.17.13-1-pve] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
Smartctl open device: /dev/bus/0 [megaraid_disk_02] failed: INQUIRY failed

看了一下是firmware比較新





等待原廠回應如何解決