Skip to content

Nuface Blog

隨意隨手記 Casual Notes

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

Category: Firewall

About Firewall

Hairpin NAT vs. Split DNS — Which Is the Right Choice for Your Network?

Posted on 2025-11-042025-11-04 by Rico

💡 Hairpin NAT (NAT Loopback) — Allow Internal Users to Access Internal Servers Using Public Domain Names 🧱 1. The Scenario In many corporate or home networks, administrators use NAT (Network Address Translation) to expose internal servers to the Internet.For example: External users can access mail.example.com without issues.However, when internal users try to access the…

Read more

Hairpin NAT vs Split DNS:哪種才是正確做法?

Posted on 2025-11-042025-11-04 by Rico

🧱 一、發生的情境 在企業或家庭網路中,我們常透過 NAT(Network Address Translation) 將內部伺服器對外提供服務。例如: 這時候,外部用戶從網際網路訪問 mail.example.com 一切正常。但公司內部用戶如果也輸入相同網址(mail.example.com),卻發現: ❌ 無法連線、逾時、或導向錯誤的主機。 這就是典型的 Hairpin NAT(又稱 NAT Loopback) 問題。 🧭 二、問題的本質 NAT 裝置(例如 Router、防火牆、OPNsense、Linux Gateway)收到封包時的邏輯如下: 簡單說,NAT 預設只處理外部 → 內部 的轉換,而不會自我迴圈。這就像你寄信到自己的郵局地址,但郵差不知道該送回自己家。 ⚙️ 三、Hairpin NAT 的運作原理 Hairpin NAT 讓「內部客戶端 → NAT 公網 IP → 內部伺服器」的封包能正確繞回內網。 流程如下: 最關鍵的部分是第 3 步的 SNAT: 如果不改變來源 IP,Server 看到來源為同網段(192.168.1.20),會直接回封包,不經 NAT,導致連線中斷。 🧩 四、常見環境設定方式 🔹 1️⃣…

Read more

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5

Recent Posts

  • Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide
  • Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學
  • Deploying DANE in Postfix
  • 如何在 Postfix 中部署 DANE
  • DANE: DNSSEC-Based TLS Protection

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