> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/knowledge-base/zh/networking/how-to-achieve-network-micro-segmentation-on-vergeos.md).

# 如何在 VergeOS 上实现网络微分段

网络微分段是一种安全方法，可将网络划分为多个隔离的分段，每个分段都有自己的安全控制。本文将说明如何利用 VergeOS 强大的网络功能来实施微分段。

## 微分段的关键特性

VergeOS 提供了多项功能，可实现有效的网络微分段：

1. **内部网络**：创建多个隔离的虚拟网络。
2. **网络规则**：实施细粒度防火墙规则。
3. **IPSec 和 WireGuard VPN**：在网络之间建立加密隧道。
4. **租户隔离**：为强多租户环境划分独立的虚拟数据中心。
5. **网络别名**：将 IP 地址/网络分组，便于策略管理。
6. **端口镜像**：监控流量以进行安全分析。

## 实施微分段

按照以下步骤在 VergeOS 上实现网络微分段：

### 1. 设计你的网络拓扑

* 为不同的应用程序或工作负载创建独立的内部网络。
* 每个内部网络都提供默认安全的环境。

示例：

```
- Web 应用网络
- 数据库网络
- 管理网络
- 开发网络
```

### 2. 配置网络规则

使用网络规则来控制内部网络与虚拟机之间的流量：

1. 导航到网络仪表板。
2. 从左侧菜单中选择“规则”。
3. 单击“新建”以创建规则。
4. 设置动作（例如 Accept、Drop）、协议和方向。
5. 定义源网络和目标网络/IP。
6. 应用该规则。

示例规则：允许 Web 服务器通过特定端口访问数据库：

```
动作：Accept
协议：TCP
方向：Outgoing
源：Web 应用网络
目标：数据库网络
目标端口：3306
```

### 3. 利用网络别名

将 IP 地址或网络分组，便于策略管理：

1. 前往网络仪表板。
2. 从左侧菜单中选择“别名”。
3. 单击“新建”以创建别名。
4. 为别名命名并添加 IP 地址或网络。
5. 在网络规则中使用该别名。

示例：

```
别名名称：Web 服务器
IP 地址：192.168.1.10、192.168.1.11、192.168.1.12
```

### 4. 实施 VPN 隧道

对于网络之间的敏感流量，使用 IPSec 或 WireGuard VPN：

1. 导航到 VPN 配置部分。
2. 选择 IPSec 或 WireGuard。
3. 配置 VPN 设置（例如加密、身份验证）。
4. 将 VPN 应用于所需的网络。

### 5. 利用租户隔离

对于多租户环境：

* 为不同部门或客户创建独立的租户。
* 每个租户都有自己的一组隔离内部网络。

### 6. 监控和调整

使用端口镜像来监控流量：

1. 前往网络仪表板。
2. 为你想监控的网络启用端口镜像。
3. 分析流量，并根据需要调整网络规则。

## 最佳实践

* 遵循最小特权原则：只允许必要的流量。
* 定期审查并更新网络规则。
* 为网络、规则和别名使用描述性名称。
* 记录你的网络拓扑和分段策略。

通过利用这些功能并遵循这些步骤，你可以在 VergeOS 上创建高度分段的网络架构，实施零信任原则，并减少潜在的攻击面。

***

{% hint style="info" %}
**文档信息**

* 最后更新：2024-08-29
* vergeOS 版本：4.12.6
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.verge.io/knowledge-base/zh/networking/how-to-achieve-network-micro-segmentation-on-vergeos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
