This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/master by this push:
new 537406b230f update(qos): new foreign ip whitelist config decs. (#1623)
537406b230f is described below
commit 537406b230f3795423750d326105e2cfeb0f743a
Author: Koy Zhuang <[email protected]>
AuthorDate: Fri Dec 2 23:09:42 2022 +0800
update(qos): new foreign ip whitelist config decs. (#1623)
---
.../java-sdk/reference-manual/qos/overview.md | 25 +++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/content/zh/docs3-v2/java-sdk/reference-manual/qos/overview.md
b/content/zh/docs3-v2/java-sdk/reference-manual/qos/overview.md
index 189108e7f2a..6846ed64f7b 100644
--- a/content/zh/docs3-v2/java-sdk/reference-manual/qos/overview.md
+++ b/content/zh/docs3-v2/java-sdk/reference-manual/qos/overview.md
@@ -9,11 +9,12 @@ description: dubbo 2.5.8 新版本增加了 QOS 模块,提供了新的 telnet
## 相关参数说明
QoS 提供了一些启动参数,来对启动进行配置,他们主要包括:
-| 参数 | 说明 | 默认值 |
-| ------------------ | ----------------- | ------ |
-| qos-enable | 是否启动QoS | true |
-| qos-port | 启动QoS绑定的端口 | 22222 |
-| qos-accept-foreign-ip | 是否允许远程访问 | false |
+| 参数 | 说明 | 默认值 |
+|---------------------------------|----------------|-------|
+| qos-enable | 是否启动QoS | true |
+| qos-port | 启动QoS绑定的端口 | 22222 |
+| qos-accept-foreign-ip | 是否允许远程访问 | false |
+| qos-accept-foreign-ip-whitelist | 支持的远端主机ip地址(段) | (无) |
> 注意,从2.6.4/2.7.0开始,qos-accept-foreign-ip默认配置改为false,如果qos-accept-foreign-ip设置为true,有可能带来安全风险,请仔细评估后再打开。
@@ -55,6 +56,16 @@ dubbo.application.qos-accept-foreign-ip=false
```
拒绝远端主机发出的命令,只允许服务本机执行。
+同时可以通过设置`qos-accept-foreign-ip-whitelist`来指定支持的远端主机ip地址(段),多个ip地址(段)之间用**逗号**分隔,如:
+> 配置文件`dubbo.properties`
+```
+dubbo.application.qos-accept-foreign-ip-whitelist=123.12.10.13, 132.12.10.13/24
+```
+> 设置 JVM 参数:
+```
+-Ddubbo.application.qos-accept-foreign-ip-whitelist=123.12.10.13,132.12.10.13/24
+```
+
## 协议
### telnet 与 http 协议
@@ -112,6 +123,7 @@ As Consumer side:
-Ddubbo.application.qos-enable=true
-Ddubbo.application.qos-port=33333
-Ddubbo.application.qos-accept-foreign-ip=false
+-Ddubbo.application.qos-accept-foreign-ip-whitelist=123.12.10.13,132.12.10.13/24
```
### 使用 dubbo.properties 文件配置
@@ -120,6 +132,7 @@ As Consumer side:
dubbo.application.qos-enable=true
dubbo.application.qos-port=33333
dubbo.application.qos-accept-foreign-ip=false
+dubbo.application.qos-accept-foreign-ip-whitelist=123.12.10.13, 132.12.10.13/24
```
### 使用XML方法配置
@@ -135,6 +148,7 @@ dubbo.application.qos-accept-foreign-ip=false
<dubbo:application name="demo-provider">
<dubbo:parameter key="qos-enable" value="true"/>
<dubbo:parameter key="qos-accept-foreign-ip" value="false"/>
+ <dubbo:parameter key="qos-accept-foreign-ip-whitelist"
value="123.12.10.13,132.12.10.13/24"/>
<dubbo:parameter key="qos-port" value="33333"/>
</dubbo:application>
<dubbo:registry address="multicast://224.5.6.7:1234"/>
@@ -151,4 +165,5 @@ dubbo.application.qos-accept-foreign-ip=false
dubbo.application.qos-enable=true
dubbo.application.qos-port=33333
dubbo.application.qos-accept-foreign-ip=false
+dubbo.application.qos-accept-foreign-ip-whitelist=123.12.10.13, 132.12.10.13/24
```