首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >网络的未绑定DNS解析器

网络的未绑定DNS解析器
EN

Server Fault用户
提问于 2016-03-06 13:56:03
回答 1查看 2.3K关注 0票数 1

实际上,我试图为我的本地网络创建一个DNS解析器,为此,我选择使用未绑定,所以我将它安装在一个Arch Linux服务器上,并且它正在工作,但只对本地计算机(127.0.0.1),而不是对网络(我想在192.168.0.1-192.168.0.30范围内向IP开放,我认为这与192.168.0.0/27相对应),但我找不到配置文件的问题所在,解析器只在本地机器上执行“do @127.0.0.1 example.com”或“do @192.168.0.2 example.com”时响应,但在网络的其他计算机上(如果您想知道的话,是192.168.0.4 )时就不会响应,因为我没有从未绑定中得到错误,它只是没有从作为本地网络一部分的计算机获得请求。

下面是我使用的配置文件:

代码语言:javascript
复制
server:
# Maximum verbosity
verbosity: 5

# Answer queries from
# The local machine
interface: 127.0.0.1
interface: ::1
# The local machine on the network
interface: 192.168.0.2

# Default DNS port
port: 53

# Save in cache for an hour to a day
cache-min-ttl: 3600
cache-max-ttl: 86400

# Enable IPv4, IPv6, UDP and TCP requests
do-ip4: yes
do-ip6: yes
do-udp: yes
do-tcp: yes

# Launch in a deamon (temporarily disabled)
# do-daemonize: yes

# Deny all the Internet (temporarily refuse)
access-control: 0.0.0.0/0 refuse
access-control: ::0/0 refuse
# Allow localhost
access-control: 127.0.0.1 allow
access-control: ::1 allow
# Allow network from 192.168.0.0 to 192.168.0.30
access-control: 192.168.0.0/27 allow
access-control: 2001:db8::/108 allow

# List of DNS root zone (automatically downloaded every 5 days with a CRON)
root-hints: "named.cache"

# Hide identity and version
hide-identity: yes
hide-version: yes

# Localhost
private-address: 127.0.0.1
private-address: ::1
# Network
private-address: 192.168.0.0/27
private-address: 2001:db8::/108

# Prevent from resolving network IPs
do-not-query-address: 192.168.0.0/27
do-not-query-localhost: yes

# Prefetch old-cached DNS responses
prefetch: yes

提前感谢您的回复。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2016-03-06 16:33:25

检查是否有防火墙在运行。这将允许本地答案,但入站查询将被删除。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/761923

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档