Dnsmasq: Difference between revisions
(→server) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* http://www.thekelleys.org.uk/dnsmasq/doc.html | * http://www.thekelleys.org.uk/dnsmasq/doc.html | ||
* man page: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html | |||
=Overview= | =Overview= | ||
Line 20: | Line 21: | ||
/etc/resolv.conf | /etc/resolv.conf | ||
==Configuration Options== | |||
== | ====server==== | ||
server=/<''domain''>/<''domain''>/<''ip-addr''>[#<''port''>] | |||
server=/cluster.local/172.30.0.1 | |||
====no-resolv==== | ====no-resolv==== | ||
Do not read /etc/resolv.conf, get upstream servers only from command line or our own configuration files. | Do not read /etc/resolv.conf, get upstream servers only from command line or our own configuration files. | ||
====domain-needed==== | |||
Never forward A or AAAA queries for plain names, without dots or domain parts, to upstream nameservers. If the name is not known from /etc/hosts or DHCP then a "not found" answer is returned. | |||
=Operations= | |||
==Setting up a DNS Server with Dnsmasq== | |||
{{Internal|Setting up a DNS Server with Dnsmasq|Setting up a DNS Server with Dnsmasq}} |
Latest revision as of 22:23, 13 October 2017
External
- http://www.thekelleys.org.uk/dnsmasq/doc.html
- man page: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
Overview
Dnsmasq is a DNS query forwarder. It will not answer arbitrary queries by recursively interact with root DNS servers. It will forward such queries to a fully recursive upstream DNS server.
The upstream servers can be inferred from /etc/resolv.conf (unless no-resolv is specified), specified on command line with --server option or specified in the Dnsmasq configuration files with:
server=192.168.122.12
The upstream servers specified on command line or in the configuration file can optionally take a domain name which tells dnsmasq to use that server only to find names in that particular domain.
Configuration
/etc/dnsmasq.conf
/etc/dnsmasq.d/
/etc/resolv.conf
Configuration Options
server
server=/<domain>/<domain>/<ip-addr>[#<port>]
server=/cluster.local/172.30.0.1
no-resolv
Do not read /etc/resolv.conf, get upstream servers only from command line or our own configuration files.
domain-needed
Never forward A or AAAA queries for plain names, without dots or domain parts, to upstream nameservers. If the name is not known from /etc/hosts or DHCP then a "not found" answer is returned.