Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login
Menu

Blog

OPNsense NetFlow / Insight — Practical Traffic Analysis Guide

Posted on 2025-11-102025-11-10 by Rico

🧠 1. What is NetFlow / Insight? In modern network management, visibility is key.OPNsense includes a powerful module called NetFlow / Insight, which allows administrators to monitor, visualize, and analyze network traffic in real time — including source, destination, protocol, and bandwidth usage. ⚙️ 2. How NetFlow Works NetFlow, originally developed by Cisco, collects network…

Read more

OPNsense NetFlow / Insight 流量分析實戰教學

Posted on 2025-11-102025-11-10 by Rico

🧠 一、什麼是 NetFlow / Insight? 在企業網路管理中,我們經常需要了解「哪個部門、哪台電腦、哪個應用」正在佔用頻寬。OPNsense 內建的 NetFlow / Insight 模組,就是一套強大的 流量監控與分析工具。它能夠即時統計每個介面的網路流量,並以視覺化圖表呈現來源、目的、協定與應用分佈。 ⚙️ 二、NetFlow 的運作原理 NetFlow 由 Cisco 提出,是一種網路流量統計協定。它並不擷取封包內容,而是針對「流(Flow)」紀錄下列資訊: OPNsense 使用 softflowd 來收集封包流量,並由 flowd_aggregator 統計彙整後,在「Insight」介面中呈現結果。 與 IDS/IPS(例如 Suricata)不同,NetFlow 側重於流量分析,效能開銷極低,非常適合長期啟用。 🧩 三、如何啟用 NetFlow 功能 步驟如下: 1️⃣ 進入 OPNsense 管理介面 → Reporting → NetFlow → General2️⃣ 勾選 Enable NetFlow3️⃣ 在 Interfaces 選擇要監控的介面(例如 LAN、WAN)4️⃣ 調整: 完成後,系統會啟動 softflowd 並自動開始統計流量。…

Read more

Fixing “The HTTP_REFERER does not match the predefined settings” Error on OPNsense Behind Apache Reverse Proxy

Posted on 2025-11-102025-11-10 by Rico

When integrating OPNsense with a unified internal domain through an Apache reverse proxy, you might encounter this error when accessing the web GUI: 🧩 Root Cause This happens due to OPNsense’s built-in CSRF (Cross-Site Request Forgery) protection.The firewall validates the HTTP_REFERER header to ensure that login requests originate from a trusted hostname. When accessed via…

Read more

OPNsense 反向代理登入錯誤:「The HTTP_REFERER does not match…」解決教學

Posted on 2025-11-102025-11-10 by Rico

在企業或實驗室網路中,我們常希望透過 Apache 反向代理(Reverse Proxy) 來統一內部系統的存取網址,例如: 然而,當 OPNsense 的管理介面被反向代理後,登入時可能會出現以下錯誤訊息: 🧩 問題原因 這個錯誤與 OPNsense 的 CSRF(跨站請求偽造防護) 機制有關。OPNsense 會比對登入請求的 HTTP_REFERER 是否與系統設定的主機名稱相符。 當你透過反向代理使用 https://opnsense.demo.com/ 存取時,實際上後端看到的 Host 名稱可能不同(例如 10.0.0.1 或 firewall.localdomain),導致比對失敗而出錯。 ✅ 解決方案一:暫時停用檢查(快速但不建議長期使用) ⚠️ 安全性較低,僅建議在完全內網的環境暫時使用。 ✅ 解決方案二(推薦):修改主機名稱設定 這是最乾淨、長期穩定的做法。 現在 OPNsense 會視 opnsense.demo.com 為合法的登入來源,Referer 檢查自然通過。 🧱 Apache 反向代理設定範例 以下為 /etc/apache2/sites-available/opnsense.conf 範例: 🔐 安全建議 📘 結論 這個問題常見於使用反向代理整合 OPNsense 的環境。只要在 OPNsense 的「主機名稱」與「Alternate hostnames」設定正確,即可兼顧安全性與便利性,不必關閉…

Read more

Before Building Your Mail Server: Understanding DNS & SNI Configuration

Posted on 2025-11-072025-11-07 by Rico

Before diving into setting up your own mail server, it’s essential to understand the DNS and TLS foundations that make email delivery secure and trustworthy.This article explains the DNS records your mail system depends on and how SNI (Server Name Indication) works in both Postfix and Dovecot. 1. Why DNS Configuration Matters for Mail Servers…

Read more

在建立 Mail Server 前,必須了解的 DNS 與 SNI 設定觀念

Posted on 2025-11-072025-11-07 by Rico

一、為什麼在架設 Mail Server 前要先處理 DNS? 電子郵件的收發行為是建立在 DNS 上的。無論是外部寄信給你,還是你寄信出去,DNS 都扮演「郵局導航系統」的角色。主要涉及四項紀錄: 記錄類型 功能 範例 MX (Mail Exchanger) 告訴全世界你的郵件要送到哪一台伺服器 example.com. MX 10 mail.example.com. SPF (Sender Policy Framework) 說明哪些主機有權代表你的網域寄信 v=spf1 ip4:1.2.3.4 include:_spf.google.com -all DMARC (Domain-based Message Authentication, Reporting and Conformance) SPF、DKIM 驗證結果的策略規範與報告 v=DMARC1; p=quarantine; rua=mailto:dmarc-report@example.com DKIM (DomainKeys Identified Mail) 利用簽章機制驗證郵件內容是否被竄改 在 DNS 上建立 default._domainkey.example.com TXT 💡 實際建議: 二、Postfix 的…

Read more

Building an Enterprise-Grade Mail Server: Full Architecture Overview

Posted on 2025-11-072025-11-07 by Rico

For many small to medium businesses and technical teams, the mail system is one of the most critical — yet often overlooked — internal services.Building your own secure, reliable, and maintainable mail infrastructure can greatly reduce long-term service costs while giving you full control over your organization’s data and privacy. In this article, I’ll introduce…

Read more

自建企業級 Mail Server 架構總覽

Posted on 2025-11-072025-11-07 by Rico

在許多中小企業或技術團隊中,郵件系統往往是內部最重要、卻也最容易被忽略的一個服務。若能自行建置一套穩定、安全、可維護的郵件系統,不僅能降低長期外部服務的費用,更能完全掌握公司內部郵件的安全與隱私。 本文將介紹我目前正在使用的一套完整郵件系統架構,並簡單說明各元件的角色與實際應用情境。 🧩 系統整體架構 輔助系統: 🔧 各模組功能與角色 🏣 Postfix — 郵件核心 Postfix 是整個郵件系統的心臟,負責 SMTP 傳送與接收。它會依照 DNS 的 MX 記錄接收外部信件,並將信件投遞給內部的收信系統(Dovecot)。同時,它也負責寄信出去(relay 外部郵件)。 應用場景: 👩‍💻 PostfixAdmin — 使用者與網域管理 這是一個 PHP 網頁介面,讓管理者能輕鬆管理: 應用場景: 🗃️ MariaDB — 帳號與設定資料庫 MariaDB 負責儲存 Postfix、Dovecot 所需的帳號與設定資料,例如: 📬 Dovecot — 收信與使用者信箱管理 Dovecot 提供 IMAP/POP3 服務,讓使用者可以透過各種郵件軟體(Outlook、Apple Mail、手機)讀信。它同時支援: 應用場景: 🧱 Amavis — 郵件內容過濾中心 Amavis 是郵件防護的中樞,所有收進來的郵件都會被轉交給它處理。它會呼叫: 應用場景: 🦠…

Read more

Understanding FROM xxx AS builder in Dockerfile

Posted on 2025-11-072025-11-07 by Rico

Multi-stage Build Explained Clearly 📘 1. What Does FROM xxx AS builder Mean? In Dockerfile, defines a build stage called builder.You typically use this stage to compile or package your application, and then later copy the final artifacts into a clean runtime image using: Only the last stage (or the one you specify with –target)…

Read more

Dockerfile 中的 FROM xxx AS builder 是什麼?

Posted on 2025-11-072025-11-07 by Rico

—— 多階段建置(Multi-stage Build)完整解析 📘 一、什麼是 FROM xxx AS builder 在 Dockerfile 中,FROM ubuntu:24.04 AS builder 表示「建立一個名為 builder 的建置階段」。這個階段通常用來編譯或打包應用程式,後續可以在另一個階段中用: 把編譯好的成果(例如可執行檔或壓縮包)複製到乾淨、輕量的最終映像中。最終映像只會包含執行應用程式所需的檔案,不會帶入完整的建置工具與相依套件。 ⚙️ 二、運作原理 💡 三、優點 🧰 四、常見應用場景 🧱 五、實際範例:編譯 Postfix 結果: 🔍 六、實務建議 ✅ 結論 FROM … AS builder 是 Docker 多階段建置的核心技巧。它讓我們在「肥」的建置階段做完編譯,再把成果抽出放入「瘦」的最終映像,兼顧 體積小、安全高、可重現、可維護 —— 是現代 Dockerfile 的最佳實踐。

Read more

Posts pagination

  • Previous
  • 1
  • …
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • …
  • 36
  • Next

Recent Posts

  • Token/s and Concurrency:
  • Token/s 與並發:企業導入大型語言模型時,最容易被誤解的兩個指標
  • Running OpenCode AI using Docker
  • 使用 Docker 實際運行 OpenCode AI
  • Security Risks and Governance Models for AI Coding Tools

Recent Comments

  1. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on High Availability Architecture, Failover, GeoDNS, Monitoring, and Email Abuse Automation (SOAR)
  2. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on MariaDB + PostfixAdmin: The Core of Virtual Domain & Mailbox Management
  3. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Daily Operations, Monitoring, and Performance Tuning for an Enterprise Mail System
  4. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Final Chapter: Complete Troubleshooting Guide & Frequently Asked Questions (FAQ)
  5. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Network Architecture, DNS Configuration, TLS Design, and Postfix/Dovecot SNI Explained

Archives

  • January 2026
  • December 2025
  • November 2025
  • October 2025

Categories

  • AI
  • Apache
  • CUDA
  • Cybersecurity
  • Database
  • DNS
  • Docker
  • Fail2Ban
  • FileSystem
  • Firewall
  • Linux
  • LLM
  • Mail
  • N8N
  • OpenLdap
  • OPNsense
  • PHP
  • Python
  • QoS
  • Samba
  • Switch
  • Virtualization
  • VPN
  • WordPress
© 2026 Nuface Blog | Powered by Superbs Personal Blog theme