2026/07/12

ntopng 更新又出包
早上 6:01 更新後就死了

2026-07-12T06:01:49+0800 INFO ================================================================================
 Package             Architecture  Version                    Repository   Size
================================================================================
Upgrading:
 nprobe              x86_64        11.0.260711-8713           ntop        4.8 M
 ntop-license        x86_64        1.0-724                    ntop        668 k
 ntopng              x86_64        6.6.260711-28602           ntop         13 M


雖然 8:08有再出了一版更新 但還是沒用

2026-07-12T08:08:23+0800 INFO ===============================================================================
 Package           Arch        Version                  Repository        Size
===============================================================================
Upgrading:
 cento             x86_64      2.4.260712-1173          ntop             1.6 M
 n2disk            x86_64      3.8.260712-5580          ntop             1.7 M
 nprobe            x86_64      11.0.260712-8715         ntop             4.9 M
 ntap              x86_64      1.2.260712-131           ntop             644 k
 ntop-license      x86_64      1.0-728                  ntop             668 k
 ntopng            x86_64      6.6.260712-28602         ntop              13 M
 ntopng-data       noarch      6.6.260712-28602         ntop-noarch       60 M


這次的問題是daemon 活著
但 3000 沒 listen

先倒回備分 再等几天看看吧

2026/07/08

本次弱掃差不多所有的几器都出現以下的訊息

針對 中 進行說明跟修正


The HTTPS configuration has one or more security issues identified by the TLS risk assessment.


Risk score: 80/100

Letter grade: B

Findings:

Protocols & Connections: 3 issue(s) found

- [SYS-0000900] ALPN not negotiated (LOW)

- [SYS-0001000] Server does not support TLS_FALLBACK_SCSV (MEDIUM)

如果伺服器支援 TLS_FALLBACK_SCSV,並且發現客戶端當前使用的協議版本比它最高支援的版本低,就會回傳 inappropriate_fallback 錯誤,強制中斷連線

    修正 ssl.conf 強制只使用 TLSv1.3
    SSLProtocol -all +TLSv1.3


- [SYS-0001200] Server does not support post-quantum key exchange (MEDIUM)

server不支援處理末來來自量子電腦的攻擊 目前無法處理 

Cipher Suites: 1 issue(s) found

- [SYS-0011600] Server honors client cipher preference order (MEDIUM)

設定後對client要求較低的算法不予理會 以 server為準

    目前已強制只使用 TLSv1.3

Certificate & Chain: 2 issue(s) found

- [SYS-0021000] Certificate expires in less than 90 days (MEDIUM)

    快到期會進行更換

- [SYS-0021200] Wildcard certificate in use (LOW)

Revocation & Transparency: 2 issue(s) found

- [SYS-0030200] OCSP stapling not present (MEDIUM)

OCSP(Online Certificate Status Protocol)是用來查詢 X.509 證書是否已被撤銷的協議。傳統做法是瀏覽器自己去 CA 的 OCSP 伺服器查詢

OCSP Stapling(又稱 TLS 證書狀態查詢擴展)改成由伺服器替用戶「提前」向 CA 取得 OCSP 回應,並在 TLS 握手時一起發給瀏覽器,瀏覽器只需驗證這份已簽名的回應,不需要再連 CA 

    在ssl.conf 設定 
    SSLUseStapling On
    SSLStaplingCache shmcb:/var/run/apache2/stapling_cache(150000)

    驗証 

    openssl s_client -connect yourdomain.com:443 -status -tlsextdebug < /dev/null 2>&1 | grep -i "OCSP response"

    成功啟用 OCSP Stapling:回應中看到

    OCSP response:
    OCSP Response Data:
    OCSP Response Status: successful (0x0)
    Response Type: Basic OCSP Response


- [SYS-0030300] Must-Staple extension not present (LOW)

DNS Security: 2 issue(s) found

- [SYS-0050100] No CAA records (any CA can issue certificates) (MEDIUM)

如果域名 沒有 CAA 記錄:
CA 會認為「沒有特別限制」,任何 CA 都可以為你頒發憑證 

如果域名 有 CAA 記錄:
CA 必須檢查自己是否被授權,只有被列在 CAA 中的 CA 才能頒發憑證 。

    在DNS上設定  假設憑証是由 twca 發行
    
    @       IN  CAA 0 issue "twca.com.tw"
    @       IN  CAA 0 issuewild "twca.com.tw"




- [SYS-0050200] No DANE/TLSA records (LOW)

Other: 1 issue(s) found

- [SYS-0060600] Certificate covers 2-5 SANs (minor attack surface disclosure) (LOW)

2026/07/06

因為 mail server 打開了 pop3s 995 及 imaps 993
但之前是使用自簽的憑証
所以出現過期的告警
因此想說就直接改用網站的憑証
看一下config

/etc/dovecot/conf.d/10-ssl.conf

ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem

把key換成網站用的

但換好後使用 thunderbird 測試 一直出珼憑証有問題
找了一下資料 發現要把 中間憑証也包進去
指令如下

cat server.cer uca.cer > /etc/pki/dovecot/certs/dovecot.pem

重啟 dovecot 後再測試就沒問題了

2026/07/05

這次弱掃出現了很奇怪的事情

Vulnerability Detection Result
The remote SSH server supports the following weak KEX algorithm(s):
KEX algorithm | Reason
------------------------------------------------
diffie-hellman-group-exchange-sha1 | Using SHA-1

明明之前就修過也驗証了
到底是那裡有問題
只能猜想有沒有可能是某次更新又自己加回去
這次換個方法修

update-crypto-policies --set DEFAULT:DISABLE-CBC:NO-SHA1

檢查一次

ssh -o KexAlgorithms=diffie-hellman-group-exchange-sha1 10.0.0.1
Unable to negotiate with 10.0.0.1 port 22: no matching key exchange method found. Their offer: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,kex-strict-s-v00@openssh.com


希望之後不會再出現了

2026/07/04

又到弱掃時間
上到greenbone去看
名字改成openvas了


可是下載ova時速度最快也只有1M 總共要7.6G
光時下載就要等好几個小時
還不包括 rule update
記得之前使用官方的vm時
會有 2 cpu, 5G ram的限制
給再多也沒用

所以想說使用另一個方法來做
先安裝kali
再來安裝openvas
流程如下

apt install openvas

gvm-setup

執行的過程會隨几產生一組密碼 要記下來 等下登入要用


gvm-check-setup

gvm-start

https://127.0.0.1:9392

gvm-stop


如果要更改port或要讓遠端可以訪問
修改以下檔案

/lib/systemd/system/gsad.service


手動更新rule

sudo greenbone-feed-sync --type all


弱掃過程ram吃的不多 給個16G應該就可以了
但cpu吃非常重 能給多少就給多少 這次我是給了 60 顆
速度會快一點


2026/07/02

最近發現monitor pve guest 並重啟的程式沒作用

看文件才發現pvesh的指令有變

原來是

pvesh create /nodes/pve195/147/status/stop

改為

pvesh create /nodes/pve195/lxc/147/status/stop


現在要把guest type 加上去

所以程式要進行修正

2026/06/24

先前 ntop的更新問題

今天看到新版 20260624

更新後就正常了


https://packages.ntop.org/centos-stable/9/x86_64/Packages/