domain-name-system – 不自动包含DNSMasq地址中的所有子域

domain-name-system – 不自动包含DNSMasq地址中的所有子域,第1张

概述可以配置DNSMasq,使其仅针对该确切域的请求返回固定IP地址,而不是针对其子域返回?也就是说,我希望它在解析example.com时返回固定的IP,但不是a.example.com,b.example.com等. host-record=example.com,1.2.3.4 dnsmasq man page说: –host-record=<name>[,<name>….][<IPv4-add 可以配置DNSMasq,使其仅针对该确切域的请求返回固定IP地址,而不是针对其子域返回?也就是说,我希望它在解析example.com时返回固定的IP,但不是a.example.com,b.example.com等.解决方法
host-record=example.com,1.2.3.4

dnsmasq man page说:

–host-record=<name>[,<name>….][<IPv4-address>],[<IPv6-address>]
Add A,AAAA and PTR records to the DNS. This adds one or more names to the
DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may
appear in more than one host-record and therefore be assigned more
than one address. Only the first address creates a PTR record linking
the address to the name. This is the same rule as is used reading
hosts-files. host-record options are consIDered to be read before
host-files,so a name appearing there inhibits PTR-record creation if
it appears in hosts-file also. Unlike hosts-files,names are not
expanded,even when expand-hosts is in effect. Short and long names
may appear in the same host-record,eg.
–host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100

总结

以上是内存溢出为你收集整理的domain-name-system – 不自动包含DNSMasq地址中的所有子域全部内容,希望文章能够帮你解决domain-name-system – 不自动包含DNSMasq地址中的所有子域所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1094937.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存