1
ChoateYao 2015-06-25 14:54:41 +08:00 1
设置网卡DNS为127.0.0.1
设置DNSMASQ的resolv-file的路径, resolv-file 文件内容为上级DNS 比如 nameserver=8.8.8.8 |
2
ChoateYao 2015-06-25 14:55:05 +08:00 1
这样才对:nameserver 8.8.8.8
|
3
hzqim OP @ChoateYao 谢谢您的回答,请问您指的是 /etc/resolv.conf 吗?
这个网卡 DNS 为 127.0.0.1 只能说 DNS 架设在本地吧, 和域名解析到 127.0.0.1 是等效吗? |
4
ChoateYao 2015-06-25 15:08:03 +08:00 1
是的。
|
5
ChoateYao 2015-06-25 15:09:31 +08:00 1
难道你不是想要本地DNS缓存吗?
|
6
lk09364 2015-06-25 15:09:39 +08:00 3
http://serverfault.com/questions/351108/using-dnsmasq-to-resolve-all-hosts-to-the-same-address
> As the dnsmasq manual says … > > … just use # for a wildcard: > > address=/#/192.168.2.1 |
7
LazyZhu 2015-06-25 15:43:27 +08:00 1
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
"The domain specification works in the same was as for --server, with the additional facility that /#/ matches any domain. Thus --address=/#/1.2.3.4 will always return 1.2.3.4 for any query not answered from /etc/hosts or DHCP and not sent to an upstream nameserver by a more specific --server directive. " |