From 2f18fa57f3ec51d6e623487bd757eebce815f7e5 Mon Sep 17 00:00:00 2001 From: Nick Peng Date: Sun, 30 Apr 2023 00:15:57 +0800 Subject: [PATCH] ipset-nftset: update bind option --- docs/config/ipset-nftset.md | 13 +++++++++++++ en/docs/config/ipset-nftset.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/docs/config/ipset-nftset.md b/docs/config/ipset-nftset.md index 3e9ab49..4547da6 100644 --- a/docs/config/ipset-nftset.md +++ b/docs/config/ipset-nftset.md @@ -71,3 +71,16 @@ hide: ```shell ipset-no-speed ipsetname ``` + +## 对特定的服务端口设置ipset和nftset + +smartdns的bind参数,支持设置ipset和nftset,当设置了ipset和nftset的端口接收到请求后,将对此端口的查询请求设置ipset和nftset。 + +通过如下配置,可以将对于端口的查询请求,全部设置到ipset中,比如将第二DNS的所有查询结果,放入ipset。 + +```shell +bind [::]:6053 -ipset [ipset] -nftset [nftset] +``` + + * -ipset:参数选项参考ipset选项。 + * -nftset:选项参考nftset。 diff --git a/en/docs/config/ipset-nftset.md b/en/docs/config/ipset-nftset.md index 0b137d2..d21f4b2 100644 --- a/en/docs/config/ipset-nftset.md +++ b/en/docs/config/ipset-nftset.md @@ -71,3 +71,16 @@ Like Dnsmasq, smartdns supports ipset and nftset, which can use TPROXY to transp ```shell ipset-no-speed ipsetname ``` + +## Set ipset and nftset for specific service ports + +The bind parameter of smartdns supports setting ipset and nftset. When the port with ipset and nftset set receives a request, it will set ipset and nftset for the query request of this port. + +Through the following configuration, all query requests for ports can be set into ipset, for example, all query results of the second DNS can be put into ipset. + +```shell +bind [::]:6053 -ipset [ipset] -nftset [nftset] +``` + + * -ipset: Refer to ipset options for parameter options. + * -nftset: options refer to nftset.