Skip to content

Nuface Blog

隨意隨手記 Casual Notes

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

Blog

Understanding Unbound DNS in OPNsense — Function, Principles, and Integration with BIND9

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

🧠 1. What is Unbound DNS? Unbound is a DNS Resolver developed by NLnet Labs.It’s designed to resolve domain names for internal users — that is, to find the real IP address of a domain such as www.google.com. Unlike BIND9, which is commonly used as an Authoritative DNS server to host your company’s domain records,…

Read more

OPNsense 的 Unbound DNS — 功用、原理與與 BIND9 共存方式

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

🧠 一、Unbound 是什麼? Unbound 是一個由 NLnet Labs 開發的 DNS Resolver(遞迴式 DNS 伺服器),主要功能是: 幫內部用戶端「查詢網域名稱的真實 IP 位址」。 它不是用來「託管網域」的,而是用來 轉譯查詢(Resolve)使用者輸入的網址,例如: 所以它的角色類似於: ⚙️ 二、Unbound 的主要功能與特色 功能項目 說明 DNS Resolver(遞迴查詢) 自行從根伺服器層層解析,不依賴外部 DNS。 DNS Forwarder(轉遞模式) 可設定轉發至指定 DNS(例如 8.8.8.8、1.1.1.1 或你的 BIND9)。 DNS-over-TLS (DoT) 支援加密 DNS 查詢,提升隱私性。 DNS Rebind Protection 防止惡意網域解析回內網 IP(常見攻擊手法)。 Blocklist / Override 可封鎖廣告網域、內網覆寫特定域名(例如將 mail.company.com 指向內部 IP)。 DHCP 整合 可自動註冊內網 DHCP…

Read more

Ubuntu — Disable IPv6 and Force APT to Use IPv4

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

(For Ubuntu 22.04 / 24.04 / 24.10 / 24.04 LTS “Noble”) In many enterprise or internal environments, IPv6 is not yet supported.This often causes apt to fail when trying to download packages, showing messages like: This means Ubuntu tried to connect over IPv6, but the network doesn’t support it. 🔍 Problem Description By default, Ubuntu:…

Read more

Ubuntu 關閉 IPv6 與強制 apt 使用 IPv4 的完整指南

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

(適用 Ubuntu 22.04 / 24.04 / 24.10 / 24.04 LTS “Noble”) 在企業或內部環境中,許多網路尚未支援 IPv6,導致 Ubuntu 系統在安裝套件時出現連線錯誤。例如以下訊息: 這表示 apt 嘗試透過 IPv6 連線,但 IPv6 網路不可達,導致安裝或更新中斷。 🔍 問題說明 Ubuntu 預設會: 當伺服器、網關或防火牆未支援 IPv6 時,就會出現「Network is unreachable」或「Connection timed out」的錯誤。 🧰 解決步驟 步驟 1:永久關閉 IPv6 編輯設定檔: 在最後加入以下內容: 套用設定: 確認是否關閉: 若輸出為 1,表示 IPv6 已停用。 步驟 2:強制 apt 使用 IPv4 建立設定檔: 內容輸入: 儲存後執行: 此時…

Read more

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

Posts pagination

  • Previous
  • 1
  • …
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • …
  • 29
  • Next

Recent Posts

  • Cleaning Up Unused Let’s Encrypt Certificates in a Docker Certbot Environment
  • 使用 Docker Certbot 刪除不再使用的 Let’s Encrypt 憑證
  • Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide
  • Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學
  • Deploying DANE in Postfix

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

  • December 2025
  • November 2025
  • October 2025

Categories

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