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/09 09:55] – [Networking - DNS - Unbound - Local Data] peternetworking:dns:unbound:local_data [2022/10/08 11:48] (current) peter
Line 22: Line 22:
  
 <WRAP info> <WRAP info>
-**NOTE:**  local-data is often associated with a [[Networking:DNS:Unbound:Configure Local Zones|local-zone]]+**NOTE:**  local-data is often associated with a [[Networking:DNS:Unbound:Local Zones|local-zone]]
  
 <code> <code>
Line 31: Line 31:
 If you configure **local-data** without specifying **local-zone**, by default a transparent local-zone is created for the data. If you configure **local-data** without specifying **local-zone**, by default a transparent local-zone is created for the data.
 </WRAP> </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>
  
 ---- ----
Line 46: 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.1607507730.txt.gz · Last modified: 2020/12/09 09:55 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki