DNS
Never forward these matching domains or subdomains; resolve from DHCP or hosts files only.
Local domain suffix appended to DHCP names and hosts file entries.
Add local domain suffix to names served from hosts files.
Resolve specified FQDNs to an IP.
Syntax:
Syntax:
/fqdn[/fqdn…]/[ipaddr]./example.com/ returns NXDOMAIN./#/ matches any domain (and returns NXDOMAIN)./example.com/# returns NULL addresses (0.0.0.0, ::) for example.com and its subdomains.Query all available upstream resolvers. First answer wins.
By default, dnsmasq caches A, AAAA, CNAME and SRV DNS record types.
This option adds additional record types to the cache.
This option adds additional record types to the cache.
Bind only to configured interface addresses, instead of the wildcard address.
Listen only on the specified interfaces, and loopback if not excluded explicitly.
Listen only on the specified addresses.
Do not listen on the specified interfaces.
Listening port for inbound DNS queries.
Fixed source port for outbound DNS queries.
Min valid value
1024. Useful for systems behind firewalls.Max valid value
65535. Useful for systems behind firewalls.Hostnames are used to bind a domain name to an IP address. This setting is redundant for hostnames already configured with static leases, but it can be useful to rebind an FQDN.
| Hostname | IP address | |
|---|---|---|
| This section contains no values yet |
Bind service records to a domain name: specify the location of services. See RFC2782.
_service: _sip, _ldap, _imap, _stun, _xmpp-client, … . (Note: while _http is possible, no browsers support SRV records.)
_proto: _tcp, _udp, _sctp, _quic, … .
You may add multiple records for the same Target.
Larger weights (of the same prio) are given a proportionately higher probability of being selected.
_service: _sip, _ldap, _imap, _stun, _xmpp-client, … . (Note: while _http is possible, no browsers support SRV records.)
_proto: _tcp, _udp, _sctp, _quic, … .
You may add multiple records for the same Target.
Larger weights (of the same prio) are given a proportionately higher probability of being selected.
| SRV | Target | Port | Priority | Weight | |
|---|---|---|---|---|---|
Syntax: _service._proto.example.com. | CNAME or fqdn | Ordinal: lower comes first. | |||
| This section contains no values yet |
Bind service records to a domain name: specify the location of services.
You may add multiple records for the same domain.
You may add multiple records for the same domain.
| Domain | Relay | Priority | |
|---|---|---|---|
| This section contains no values yet |
Set an alias for a hostname.
| Domain | Target | |
|---|---|---|
| This section contains no values yet |
Set an arbitrary resource record (RR) type.
Hexdata is automatically en/decoded on save and load
Hexdata is automatically en/decoded on save and load
| Resource Record Name | Resource Record Number | Hex Data | |
|---|---|---|---|
| This section contains no values yet |
Never forward DNS queries which lack dots or domain parts.
Names not in
Names not in
/etc/hosts are answered Not found.Exempt
127.0.0.0/8 and ::1 from rebinding checks, e.g. for RBL services.List of domains to allow RFC1918 responses for.
Accept DNS queries only from hosts whose address is on a local subnet.
Filters SRV/SOA service discovery, to avoid triggering dial-on-demand links.
May prevent VoIP or other services from working.
May prevent VoIP or other services from working.
Remove IPv6 addresses from the results and only return IPv4 addresses.
Can be useful if ISP has IPv6 nameservers but does not provide IPv6 routing.
Can be useful if ISP has IPv6 nameservers but does not provide IPv6 routing.
Remove IPv4 addresses from the results and only return IPv6 addresses.
Removes records of the specified type(s) from answers.
Limit response records (from
This prevents unreachable IPs in subnets not accessible to you.
Note: IPv4 only.
/etc/hosts) to those that fall within the subnet of the querying interface.This prevents unreachable IPs in subnets not accessible to you.
Note: IPv4 only.
Do not cache negative replies, e.g. for non-existent domains.
Transform replies which contain the specified addresses or subnets into
NXDOMAIN responses.Forward specific domain queries to specific upstream servers.
File listing upstream resolvers, optionally domain-specific, e.g.
server=1.2.3.4, server=/domain/1.2.3.4.- off
- enabled (default)
- base64
- text
Add the MAC address of the requestor to DNS queries which are forwarded upstream.
enabled uses the default MAC address format encoding base64 uses an alternative encoding of the MAC as base64 text uses a human-readable encoding of hex-and-colonsRemove any MAC address information already in downstream queries before forwarding upstream.
Add a subnet address to the DNS queries which are forwarded upstream, leaving this value empty disables the feature. If an address is specified in the flag, it will be used, otherwise, the address of the requestor will be used. The amount of the address forwarded depends on the prefix length parameter: 32 (128 for IPv6) forwards the whole address, zero forwards none of it but still marks the request so that no upstream nameserver will add client address information either.
The default (
The default (
0,0) is zero for both IPv4 and IPv6. 24,96 adds the /24 and /96 subnets of the requestor for IPv4 and IPv6 requestors, respectively. 1.2.3.4/24 adds 1.2.3.0/24 for IPv4 requestors and ::/0 for IPv6 requestors. 1.2.3.4/24,1.2.3.4/24 adds 1.2.3.0/24 for both IPv4 and IPv6 requestors.Remove any subnet address already present in a downstream query before forwarding it upstream.
Maximum allowed size of EDNS0 UDP packets.
Maximum allowed number of concurrent DNS queries.
Number of cached DNS entries, 10000 is maximum, 0 is no caching.
Extend short TTL values to the seconds value given when caching them. Use with caution. (Max 1h == 3600)
Set a maximum seconds TTL value for entries in the cache.
Write received DNS queries to syslog. Dump cache on SIGUSR1, include requesting IP.
- unspecified
- KERN
- USER
- DAEMON
- AUTH
- LPR
- NEWS
- UUCP
- CRON
- LOCAL0
- LOCAL1
- LOCAL2
- LOCAL3
- LOCAL4
- LOCAL5
- LOCAL6
- LOCAL7
- stderr
Set log class/facility for syslog entries.
File with upstream resolvers.
Query upstream resolvers in the order they appear in the resolv file.
On: use instance specific hosts file only
Off: use all files in the directory including the instance specific hosts file
Off: use all files in the directory including the instance specific hosts file
List of IP sets to populate with the IPs of DNS lookup results of the FQDNs also specified here.
The netfilter components below are only regarded when running fw4.
The netfilter components below are only regarded when running fw4.
| Name of the set | FQDN | Netfilter table name | Table IP family | |
|---|---|---|---|---|
| This section contains no values yet |