# 如何獲取外網IP

{% hint style="info" %}
NAT VPS沒有獨立的外網IP，VPS使用分配的內網IP通過NAT方式共享外網IP作外網通訊。

通過下面步驟我們可以獲取當前使用的外網IP地址
{% endhint %}

## 方法1. 在面板中查看

![](/files/-MGYL2SX5xo77SUYk2iZ)

## 方法2. 登入SSH查看

使用「noVNC」或「SSH 終端」登入ssh

{% hint style="info" %}
「SSH 終端」支持複製粘貼操作
{% endhint %}

![](/files/-M1Tc15LpKIGA_qAwNiE)

輸入用戶名root和密碼登入ssh

![](/files/-M1TcUH_4ioyWxbOQXU_)

{% hint style="danger" %}
注意：輸入密碼時狀態是不可見的，輸入完回車即可。
{% endhint %}

![](/files/-M1TigDumKUpfM56Nbef)

登入ssh後輸入`curl ip.sb 或者 curl cip.cc`回車即可獲得外網IP

![](/files/-M1Tipi2Nj5TsgJASTyI)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.anyhk.net/anyhk/ru-men/getip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
