<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Bind-Address on Tarragon</title><link>https://tarrragon.github.io/blog/tags/bind-address/</link><description>Recent content in Bind-Address on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Tue, 12 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/bind-address/index.xml" rel="self" type="application/rss+xml"/><item><title>6.1 推論伺服器的綁定與暴露範圍</title><link>https://tarrragon.github.io/blog/llm/06-security/inference-server-binding/</link><pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/06-security/inference-server-binding/</guid><description>&lt;p>推論伺服器的 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/bind-address/" data-link-title="Bind Address" data-link-desc="伺服器決定接受哪些網路介面的請求、127.0.0.1 / 0.0.0.0 / 具體 LAN IP 對應三層不同的暴露範圍">bind address&lt;/a> 決定誰能從網路連到模型。本章把「我這個 server 開到哪裡了」「家裡其他電腦該不該連得到」「反向代理會放大什麼風險」整理成可操作的判讀。實際 bind / &lt;code>--host&lt;/code> / &lt;code>OLLAMA_HOST&lt;/code> 等設定指令見 &lt;a href="https://tarrragon.github.io/blog/llm/01-local-llm-services/ollama/" data-link-title="1.0 Ollama：主流推論伺服器" data-link-desc="一行 brew 裝完、ollama run 一鍵跑 Gemma 4 MTP、OpenAI 相容 API on localhost:11434">1.0 Ollama&lt;/a>、&lt;a href="https://tarrragon.github.io/blog/llm/01-local-llm-services/lm-studio/" data-link-title="1.1 LM Studio：GUI 探索模型" data-link-desc="GUI 取向的本地推論伺服器：內建模型瀏覽器、speculative decoding 設定面板、適合探索新模型">1.1 LM Studio&lt;/a>、&lt;a href="https://tarrragon.github.io/blog/llm/01-local-llm-services/llama-cpp/" data-link-title="1.2 llama.cpp：底層推論引擎" data-link-desc="GGUF 格式、量化、MTP 仍 beta；多數讀者不需要直接接觸，Ollama 已經包好">1.2 llama.cpp&lt;/a>；PC 場景的 CUDA backend 跟 Windows firewall 差異見 &lt;a href="https://tarrragon.github.io/blog/llm/05-discrete-gpu/llama-cpp-on-pc/" data-link-title="5.3 llama.cpp 在 PC 上" data-link-desc="CUDA / ROCm build 取得、核心旗標地圖、llama-bench 校準、多卡 tensor split 的入門設定">5.3&lt;/a>、&lt;a href="https://tarrragon.github.io/blog/llm/05-discrete-gpu/lm-studio-on-windows/" data-link-title="5.4 LM Studio 在 Windows" data-link-desc="Windows &amp;#43; 獨立 GPU 場景用 LM Studio：CUDA / ROCm backend 選擇、GUI 內對應 -ngl / cache-type / cpu-moe 的設定位置">5.4&lt;/a>。傳輸層加密見 backend &lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/tls-mtls/" data-link-title="TLS / mTLS" data-link-desc="說明傳輸加密與雙向憑證驗證如何保護跨邊界資料流">tls-mtls&lt;/a> 卡、流量限制見 backend &lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/rate-limit/" data-link-title="Rate Limit" data-link-desc="說明限流如何保護服務入口、下游依賴與租戶公平性">rate-limit&lt;/a> 卡。本章 framing 是個人 dev 視角；production / 對外公開 API 服務的入口治理見 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/entrypoint-and-server-protection/" data-link-title="7.3 入口治理與伺服器防護" data-link-desc="以問題驅動方式整理對外入口、管理平面與伺服器邊界">Backend 7.3 入口治理與伺服器防護&lt;/a>。&lt;/p>
&lt;p>讀完本章後、你應該能對自己跑的推論伺服器回答：bind 在哪、誰能連到、預設配置安不安全、要分享給家裡其他電腦時該怎麼設、要透過反代或 tunnel 上 internet 時要做什麼。&lt;/p>
&lt;h2 id="本章目標">本章目標&lt;/h2>
&lt;ol>
&lt;li>認識 bind address 的三層典型範圍：loopback / LAN / WAN。&lt;/li>
&lt;li>區分 llama-server / Ollama / LM Studio 在三層上的預設行為差異。&lt;/li>
&lt;li>判讀「我要讓哪些機器連到這個 server」的工作流問題。&lt;/li>
&lt;li>認識反向代理 / Cloudflare Tunnel / Tailscale 把本地伺服器搬到網路上的延伸風險。&lt;/li>
&lt;li>對應的最低安全配置：auth、TLS、firewall 規則。&lt;/li>
&lt;/ol>
&lt;h2 id="bind-address-的三層典型範圍">bind address 的三層典型範圍&lt;/h2>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">┌──────────────────────────────────────────────────────────────┐
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl">│ WAN（公開 internet） │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl">│ ↑ │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl">│ └─ 反代 / Cloudflare Tunnel / ngrok：本機 → 對外暴露 │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl">│ │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl">│ LAN（家裡 / 辦公室內網） │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl">│ ↑ │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl">│ └─ 0.0.0.0 / 192.168.x.x：本機 → 內網其他電腦可連 │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl">│ │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl">│ Loopback（本機） │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl">│ └─ 127.0.0.1 / localhost：只能本機連 │
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl">└──────────────────────────────────────────────────────────────┘&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>三層的風險梯度：&lt;/p></description><content:encoded><![CDATA[<p>推論伺服器的 <a href="/blog/llm/knowledge-cards/bind-address/" data-link-title="Bind Address" data-link-desc="伺服器決定接受哪些網路介面的請求、127.0.0.1 / 0.0.0.0 / 具體 LAN IP 對應三層不同的暴露範圍">bind address</a> 決定誰能從網路連到模型。本章把「我這個 server 開到哪裡了」「家裡其他電腦該不該連得到」「反向代理會放大什麼風險」整理成可操作的判讀。實際 bind / <code>--host</code> / <code>OLLAMA_HOST</code> 等設定指令見 <a href="/blog/llm/01-local-llm-services/ollama/" data-link-title="1.0 Ollama：主流推論伺服器" data-link-desc="一行 brew 裝完、ollama run 一鍵跑 Gemma 4 MTP、OpenAI 相容 API on localhost:11434">1.0 Ollama</a>、<a href="/blog/llm/01-local-llm-services/lm-studio/" data-link-title="1.1 LM Studio：GUI 探索模型" data-link-desc="GUI 取向的本地推論伺服器：內建模型瀏覽器、speculative decoding 設定面板、適合探索新模型">1.1 LM Studio</a>、<a href="/blog/llm/01-local-llm-services/llama-cpp/" data-link-title="1.2 llama.cpp：底層推論引擎" data-link-desc="GGUF 格式、量化、MTP 仍 beta；多數讀者不需要直接接觸，Ollama 已經包好">1.2 llama.cpp</a>；PC 場景的 CUDA backend 跟 Windows firewall 差異見 <a href="/blog/llm/05-discrete-gpu/llama-cpp-on-pc/" data-link-title="5.3 llama.cpp 在 PC 上" data-link-desc="CUDA / ROCm build 取得、核心旗標地圖、llama-bench 校準、多卡 tensor split 的入門設定">5.3</a>、<a href="/blog/llm/05-discrete-gpu/lm-studio-on-windows/" data-link-title="5.4 LM Studio 在 Windows" data-link-desc="Windows &#43; 獨立 GPU 場景用 LM Studio：CUDA / ROCm backend 選擇、GUI 內對應 -ngl / cache-type / cpu-moe 的設定位置">5.4</a>。傳輸層加密見 backend <a href="/blog/backend/knowledge-cards/tls-mtls/" data-link-title="TLS / mTLS" data-link-desc="說明傳輸加密與雙向憑證驗證如何保護跨邊界資料流">tls-mtls</a> 卡、流量限制見 backend <a href="/blog/backend/knowledge-cards/rate-limit/" data-link-title="Rate Limit" data-link-desc="說明限流如何保護服務入口、下游依賴與租戶公平性">rate-limit</a> 卡。本章 framing 是個人 dev 視角；production / 對外公開 API 服務的入口治理見 <a href="/blog/backend/07-security-data-protection/entrypoint-and-server-protection/" data-link-title="7.3 入口治理與伺服器防護" data-link-desc="以問題驅動方式整理對外入口、管理平面與伺服器邊界">Backend 7.3 入口治理與伺服器防護</a>。</p>
<p>讀完本章後、你應該能對自己跑的推論伺服器回答：bind 在哪、誰能連到、預設配置安不安全、要分享給家裡其他電腦時該怎麼設、要透過反代或 tunnel 上 internet 時要做什麼。</p>
<h2 id="本章目標">本章目標</h2>
<ol>
<li>認識 bind address 的三層典型範圍：loopback / LAN / WAN。</li>
<li>區分 llama-server / Ollama / LM Studio 在三層上的預設行為差異。</li>
<li>判讀「我要讓哪些機器連到這個 server」的工作流問題。</li>
<li>認識反向代理 / Cloudflare Tunnel / Tailscale 把本地伺服器搬到網路上的延伸風險。</li>
<li>對應的最低安全配置：auth、TLS、firewall 規則。</li>
</ol>
<h2 id="bind-address-的三層典型範圍">bind address 的三層典型範圍</h2>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln"> 1</span><span class="cl">┌──────────────────────────────────────────────────────────────┐
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">│ WAN（公開 internet）                                          │
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">│  ↑                                                            │
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">│  └─ 反代 / Cloudflare Tunnel / ngrok：本機 → 對外暴露         │
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">│                                                               │
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">│ LAN（家裡 / 辦公室內網）                                       │
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">│  ↑                                                            │
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">│  └─ 0.0.0.0 / 192.168.x.x：本機 → 內網其他電腦可連            │
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">│                                                               │
</span></span><span class="line"><span class="ln">10</span><span class="cl">│ Loopback（本機）                                              │
</span></span><span class="line"><span class="ln">11</span><span class="cl">│  └─ 127.0.0.1 / localhost：只能本機連                         │
</span></span><span class="line"><span class="ln">12</span><span class="cl">└──────────────────────────────────────────────────────────────┘</span></span></code></pre></div><p>三層的風險梯度：</p>
<table>
  <thead>
      <tr>
          <th>層</th>
          <th>誰能連</th>
          <th>個人 dev 場景的常見用途</th>
          <th>暴露後果</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Loopback</td>
          <td>只有本機 process</td>
          <td>VS Code Continue.dev、本機 CLI 工具</td>
          <td>攻擊面最小、本機已被入侵就無防線</td>
      </tr>
      <tr>
          <td>LAN</td>
          <td>同一網段的所有設備</td>
          <td>家裡其他電腦 / 平板用、實驗室共用</td>
          <td>同網段惡意設備、訪客 Wi-Fi、IoT 設備都可能連</td>
      </tr>
      <tr>
          <td>WAN</td>
          <td>整個 internet</td>
          <td>出門用、分享給朋友、實驗 SaaS-like 部署</td>
          <td>任何人都能掃到、不認識的人也能發 prompt、API key 被偷</td>
      </tr>
  </tbody>
</table>
<h2 id="三個主流伺服器的預設行為">三個主流伺服器的預設行為</h2>
<table>
  <thead>
      <tr>
          <th>伺服器</th>
          <th>預設 bind</th>
          <th>改 bind 的方式</th>
          <th>預設 auth</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>llama-server（llama.cpp）</td>
          <td>127.0.0.1</td>
          <td><code>--host 0.0.0.0</code> 或 <code>--host 192.168.x.x</code></td>
          <td>無、可用 <code>--api-key</code></td>
      </tr>
      <tr>
          <td>Ollama</td>
          <td>127.0.0.1</td>
          <td>環境變數 <code>OLLAMA_HOST=0.0.0.0</code></td>
          <td>無、需自行加反代</td>
      </tr>
      <tr>
          <td>LM Studio（GUI 模式）</td>
          <td>127.0.0.1</td>
          <td>Local Server 設定面板切換</td>
          <td>無、需自行加反代</td>
      </tr>
  </tbody>
</table>
<blockquote>
<p><strong>事實查核註</strong>：上表的預設值是 2026 年 5 月主流版本的常見配置、各工具的預設值可能因版本變動、建議引用前以對應工具的官方文件跟 <code>--help</code> 為準。Ollama 從某個版本開始支援部分驗證機制、具體版本見 <a href="https://github.com/ollama/ollama/releases">Ollama GitHub release notes</a>。</p></blockquote>
<p>預設都是 <code>127.0.0.1</code>、是個人 dev 友善的安全起點。改到 <code>0.0.0.0</code> 之前、值得停下來想三個問題：</p>
<ol>
<li>真的需要其他機器連嗎？多數場景只需要本機連、保持 loopback。</li>
<li>同網段有哪些其他設備？家裡的 IoT 設備、訪客手機都算。</li>
<li>開出去後、API key / prompt 內容會被誰看到？</li>
</ol>
<h2 id="不小心開到-lan的常見路徑">「不小心開到 LAN」的常見路徑</h2>
<p>個人 dev 場景下、誤開放到 LAN 的常見路徑：</p>
<ol>
<li><strong>複製貼上社群教學的指令</strong>：教學作者也許在 lab 環境跑、把 <code>--host 0.0.0.0</code> 寫進範例；複製貼上時沒注意。</li>
<li><strong>Docker / 容器化跑伺服器</strong>：Docker 預設 bridge 網路、若 <code>-p 8080:8080</code> 沒指定 host、port 會 bind 到所有介面、等同 <code>0.0.0.0</code>。改用 <code>-p 127.0.0.1:8080:8080</code> 限定本機。</li>
<li><strong>環境變數從 dotfile 載入</strong>：把 <code>OLLAMA_HOST=0.0.0.0</code> 設在 dotfile、再裝其他工具時忘了這個設定還在生效。</li>
<li><strong>多台機器想互通</strong>：例如 dev 用筆電、模型在桌機；想當作小型 server 時、若同網段有不信任的設備、就要做 auth。</li>
</ol>
<p>檢查當前 bind 狀態的指令：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># macOS / Linux</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">lsof -i -P -n <span class="p">|</span> grep LISTEN <span class="p">|</span> grep -E <span class="s2">&#34;(ollama|llama|lmstudio|1234|8080|11434)&#34;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># 或用 ss（Linux）</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">ss -lntp <span class="p">|</span> grep -E <span class="s2">&#34;(1234|8080|11434)&#34;</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl">
</span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="c1"># 或用 netstat（macOS / Linux）</span>
</span></span><span class="line"><span class="ln">8</span><span class="cl">netstat -an <span class="p">|</span> grep LISTEN <span class="p">|</span> grep -E <span class="s2">&#34;(1234|8080|11434)&#34;</span></span></span></code></pre></div><p>看到 <code>127.0.0.1:11434</code> 是 loopback、<code>*:11434</code> 或 <code>0.0.0.0:11434</code> 是 bind 到所有介面。</p>
<h2 id="暴露後的具體後果">暴露後的具體後果</h2>
<p>把 bind 開到 LAN（甚至 WAN）、可能的具體後果：</p>
<ol>
<li><strong>prompt 內容洩漏</strong>：每個 prompt 包含的 code、檔案路徑、API key、商業邏輯都會在請求 body 裡。同網段任何人 dump 流量都能看到（HTTP）或要破 TLS（HTTPS）。</li>
<li><strong>API 被別人用</strong>：對方拿你的 server 跑他自己的 prompt、消耗你的算力跟電費；若你的 server 連到雲端 LLM 當 fallback、會消耗你的 API quota。</li>
<li><strong>被當跳板</strong>：tool use 啟用的話、攻擊者可以透過 prompt 觸發 tool 的副作用、讀寫檔案、執行 shell command（見 <a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2</a>）。</li>
<li><strong>被當 DoS 目標</strong>：發送大量 prompt 讓 GPU 滿載、影響本機其他工作。</li>
</ol>
<p>WAN 暴露的進一步後果：</p>
<ol start="5">
<li><strong>被自動化 scanner 掃到</strong>：internet 上有持續掃描常見 port 的 bot、<code>11434</code> / <code>8080</code> 是知名 LLM port、會被加進掃描清單。</li>
<li><strong>被列入公開 LLM 服務清單</strong>：類似 Shodan 的服務會收錄對外可用的 inference endpoint、可能被「LLM as free service」目錄列進去。</li>
</ol>
<blockquote>
<p><strong>事實查核註</strong>：「公開 LLM endpoint 被掃描跟列進目錄」是社群觀察到的現象、具體 scanner 工具、目錄服務跟頻率依時段變動、建議引用前以 <a href="https://www.shodan.io/">Shodan</a> 等公開掃描資料庫的當前狀態為準。</p></blockquote>
<h2 id="想分享-lan-時的最低安全配置">想分享 LAN 時的最低安全配置</h2>
<p>如果你的工作流真的需要讓家裡另一台機器連（例如桌機跑模型、筆電寫 code）、最低應該做：</p>
<ol>
<li><strong>限定 LAN 介面、不要 0.0.0.0</strong>：bind 到具體 LAN IP（如 <code>--host 192.168.1.5</code>）、不要 bind 到所有介面。</li>
<li><strong>開 firewall 規則</strong>：macOS 用內建 Firewall、Linux 用 ufw / iptables、Windows 用內建 Firewall、限定只接受同網段來源。</li>
<li><strong>加 API key</strong>：llama-server 支援 <code>--api-key &lt;key&gt;</code>、其他伺服器透過反代（如 caddy / nginx）加 basic auth 或 API key。</li>
<li><strong>不接訪客 Wi-Fi</strong>：訪客 Wi-Fi 通常跟主網段共用、要分開 VLAN 或直接不開放。</li>
<li><strong>檢查同網段設備清單</strong>：用 <code>arp -a</code> 或 router 管理介面看連著哪些 MAC address、有不認識的就先別開。</li>
</ol>
<h2 id="想透過反代--tunnel-上-wan-的延伸風險">想透過反代 / tunnel 上 WAN 的延伸風險</h2>
<p>把本地 LLM 暴露到 WAN 的常見技術：</p>
<table>
  <thead>
      <tr>
          <th>技術</th>
          <th>特性</th>
          <th>個人 dev 視角的風險</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Cloudflare Tunnel</td>
          <td>不開 router port、tunnel 進 Cloudflare、Cloudflare 對外</td>
          <td>prompt 經過 Cloudflare、依政策可能 log；Cloudflare 帳號是 trust point</td>
      </tr>
      <tr>
          <td>ngrok</td>
          <td>同上、tunnel 進 ngrok</td>
          <td>同上、ngrok 帳號是 trust point</td>
      </tr>
      <tr>
          <td>Tailscale / WireGuard</td>
          <td>mesh VPN、端到端加密</td>
          <td>設備加入 mesh 後互信、設備本身被入侵會直接拿到 LLM</td>
      </tr>
      <tr>
          <td>nginx / caddy + 反代</td>
          <td>自己跑反代、自己加 TLS / auth</td>
          <td>反代設定錯誤、TLS 證書管理失誤都會把 server 直接曝光</td>
      </tr>
  </tbody>
</table>
<p>進階防護見 <a href="/blog/backend/07-security-data-protection/entrypoint-and-server-protection/" data-link-title="7.3 入口治理與伺服器防護" data-link-desc="以問題驅動方式整理對外入口、管理平面與伺服器邊界">Backend 7.3 入口治理</a> 跟 <a href="/blog/backend/07-security-data-protection/transport-trust-and-certificate-lifecycle/" data-link-title="7.5 傳輸信任與憑證生命週期" data-link-desc="以問題驅動方式整理傳輸信任鏈、會話完整性與憑證節奏">Backend 7.5 傳輸信任與憑證生命週期</a>。個人 dev 場景的判讀：</p>
<ol>
<li><strong>預設不要上 WAN</strong>：若沒有具體需求（如多裝置工作流、跨地點協作）、保持 LAN 或 loopback。</li>
<li><strong>要上 WAN 時優先用 Tailscale-like mesh</strong>：可以保持「私網」感覺、不暴露在公開 internet 上。</li>
<li><strong>真的要公開（如做給朋友試用的 demo）</strong>：上反代、做 auth、明確跟使用者說會 log 什麼。</li>
</ol>
<h2 id="給讀者的綁定判讀流程">給讀者的綁定判讀流程</h2>
<p>每次啟動 / 配置新伺服器時的判讀流程：</p>
<ol>
<li><strong>明確列出「誰需要連」</strong>：只有本機 IDE？家裡桌機？外出筆電？朋友的 demo？</li>
<li><strong>選擇對應的 bind 範圍</strong>：本機選 loopback、家裡選 LAN IP、外出選 mesh VPN、公開 demo 才用反代。</li>
<li><strong>跑 <code>lsof / netstat / ss</code> 確認實際 bind 狀態</strong>：跟意圖一致才算配好。</li>
<li><strong>若 bind 到 LAN / WAN、加 API key</strong>：別假設「沒人會掃到」、做最低 auth。</li>
<li><strong>記下當前配置</strong>：寫在 <code>~/llm/server-config.md</code> 之類、避免日後忘了哪台是哪個 mode。</li>
</ol>
<h2 id="下一章">下一章</h2>
<p>下一章：<a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2 tool use 與 MCP server 的權限模型</a>、處理伺服器跑起來後最大的副作用面。</p>
]]></content:encoded></item></channel></rss>