User Tools

Site Tools


networking:dns:unbound:local_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:dns:unbound:local_data [2020/12/08 08:57] peternetworking:dns:unbound:local_data [2022/10/08 11:48] (current) peter
Line 9: Line 9:
 </code> </code>
  
 +<WRAP info>
 **NOTE:**   **NOTE:**  
  
Line 14: Line 15:
   * If  not matched exactly, the local-zone type determines further processing.   * If  not matched exactly, the local-zone type determines further processing.
   * If local-data is configured that is not a subdomain of a local-zone, a transparent local-zone is configured.   * If local-data is configured that is not a subdomain of a local-zone, a transparent local-zone is configured.
- 
   * For record types such as **TXT**, use  single quotes, as in <code bash>   * For record types such as **TXT**, use  single quotes, as in <code bash>
 local-data: 'example. TXT "text"'. local-data: 'example. TXT "text"'.
 +</code>
 +
 +</WRAP>
 +
 +<WRAP info>
 +**NOTE:**  local-data is often associated with a [[Networking:DNS:Unbound:Local Zones|local-zone]]
 +
 +<code>
 +local-zone: <zone> <type>
 +local-data: "<resource record string>"
 +</code>
 +
 +If you configure **local-data** without specifying **local-zone**, by default a transparent local-zone is created for the data.
 +</WRAP>
 +
 +----
 +
 +You can add locally served data with:
 +
 +<code>
 +local-zone: "local." static
 +local-data: "mycomputer.local. IN A 192.0.2.51"
 +local-data: 'mytext.local TXT "content of text record"'
 +</code>
 +
 +You can override certain queries with:
 +
 +<code>
 +local-data: "adserver.example.com A 127.0.0.1"
 +</code>
 +
 +You can redirect a domain to a fixed address with:
 +
 +<code>
 +# This makes example.com, www.example.com, etc, all go to 192.0.2.3.
 +local-zone: "example.com" redirect
 +local-data: "example.com A 192.0.2.3"
 +</code>
 +
 +You can also add PTR records using local-data directly ("ipv4 name" or "ipv6 name"), but then you need to do the reverse notation yourself:
 +
 +<code>
 +local-data-ptr: "192.0.2.3 www.example.com"
 </code> </code>
  
Line 33: Line 76:
  
 https://nlnetlabs.nl/documentation/unbound/unbound.conf/ https://nlnetlabs.nl/documentation/unbound/unbound.conf/
 +
 +https://fossies.org/linux/unbound/doc/example.conf.in
networking/dns/unbound/local_data.1607417872.txt.gz · Last modified: 2020/12/08 08:57 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki