Files
smartdns/docs/config/security.md
2023-03-10 23:53:17 +08:00

41 lines
696 B
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
---
# 安全相关
smartdns为DNS服务器默认绑定53端口这时smartdns需要root权限并且有可能导致外网也能进行数据查询。所以通过如下方式对smartdns进行安全加固
## 使用非root权限运行
通过user指定非root用户运行如使用nobody运行
```shell
user nobody
```
## 绑定特定的IP或网口
通过bind参数指定绑定的IP地址或网口
1. 绑定特定的IP
```shell
bind 192.168.1.1:53
```
1. 绑定特定的网口
```shell
bind [::]:53@eth0
```
## 对公网提供查询时使用TLS服务器
使用TLS服务器对外提供服务
```shell
bind-tls [::]:853@eth0
```