主机论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 57|回复: 3

本地dnsmasq里上游dns8888间歇性失效

[复制链接]

47

主题

218

帖子

663

积分

高级会员

Rank: 4

积分
663
发表于 2023-10-17 11:54:39 | 显示全部楼层 |阅读模式
服务器是centos系统,为了突破chatgpt的屏蔽,我在本机开了dnsmasq服务。

/etc/dnsmasq.conf中,上游dns服务器使用的是server=8.8.8.8,单独转发server=/openai.com/xx.xx.xx.xx

这样用了半年多,一直挺稳定。

但是最近连续几天,这个dnsmasq间歇性抽风,频率还蛮高的,大概隔几分钟就抽风。抽风的时候具体表现如下,

# nslookup google.com 8.8.8.8
Server:                8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:        google.com
Address: 142.250.199.110

# nslookup google.com        
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

你们看,直接使用8.8.8.8进行nslookup是成功的,但通过dnsmasq查询时失败,这似乎指向了dnsmasq本身或其配置作为可能的问题原因。

我一顿排查dnsmasq的配置文件,愣是找不出问题。

目前,我把dnsmasq里的上游dns改为了1.1.1.1之后,问题便不再出现。。。

这踏马到底是啥问题啊?
回复

使用道具 举报

122

主题

310

帖子

1134

积分

金牌会员

Rank: 6Rank: 6

积分
1134
发表于 2023-10-17 12:03:10 | 显示全部楼层
all-servers
server=1.1.1.1
server=8.8.8.8
同时查询,哪个响应快用哪个
回复

使用道具 举报

47

主题

218

帖子

663

积分

高级会员

Rank: 4

积分
663
 楼主| 发表于 2023-10-17 12:10:30 | 显示全部楼层
nop 发表于 2023-10-17 12:03
all-servers
server=1.1.1.1
server=8.8.8.8

刚开始我只是
server=8.8.8.8
server=1.1.1.1

这样的,8888在前面。 现在我给8888删了 就好了 唉
这个all-servers是啥?
回复

使用道具 举报

0

主题

81

帖子

288

积分

中级会员

Rank: 3Rank: 3

积分
288
发表于 2023-10-17 12:03:00 | 显示全部楼层
--all-servers
By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting this flag forces dnsmasq to send all queries to all available servers. The reply from the server which answers first will be returned to the original requester.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|主机论坛

GMT+8, 2024-5-12 23:57 , Processed in 0.101759 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表