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

可以配置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

相关文章

操作步骤 1、进入elasticsearch的plugin,进入ik。进入config。 2、在config下面建立以.dic为后缀的字典...
lengend data数据中若存在&#39;&#39;,则表示换行,用&#39;&#39;切割。
代码实现 option = { backgroundColor: &amp;#39;#080b30&amp;#39;, tooltip: { trigger: &...
问题原因 原因在于直接在js中取的变量并复制给var变量。 于是就变成这样。 解决办法 var data = &#...
前言 最近做了一个调查问卷导出的功能,需求是将维护的题目,答案,导出成word,参考了几种方案之后,选...
对于很多人来说,用字符编码都是熟能生巧,而不清楚为什么是那样的字符编码,所以我在这列了一个表,翻...