Files
smartdns/docs/config/block-ipv6.md
2023-06-03 17:46:49 +08:00

50 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
hide:
- toc
---
# 禁用IPV6
目前IPV6已经进入千家万户但有时需要禁用IPV6地址smartdns支持如下方式禁用IPV6地址。
1. 方法一完全禁用IPV6
```shell
force-AAAA-SOA yes
```
1. 方法二禁用特定域名的IPV6
```shell
address /example.com/#6
```
1. 方法三如需禁用特定查询端口的IPV6查询比如第二DNS可以配置如下
```shell
bind :53 -force-aaaa-soa
```
1. 例外配置:
在开启禁用AAAA记录时如果需要特定的例外域名可以通过下面方式添加例外
```shell
address /example.com/-
address /example.com/-6
```
## 其他查询请求的禁用
1. smartdns支持对其他查询请求的禁用对应参数为force-qtype-SOA
```shell
force-qtype-SOA 28
```
force-qtype-SOA参数后为DNS的类型。具体的类型可以查询[IANA说明](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4)
## 附加说明
smartdns具备自动检测IPV6环境的能力如果网络环境不支持IPV6则会自动禁用IPV6相关的优化功能。