Changes

Jump to navigation Jump to search
262 bytes added ,  22:55, 9 January 2023
m
no edit summary
Line 8: Line 8:     
== TinyDNS ==
 
== TinyDNS ==
This is the software holding the DNS entry for all the local hosts and local domains. It resides in /var/services/tinydns. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision.
+
This is the software holding the DNS entry for all the local hosts and local domains. It resides in /var/service/tinydns. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision.
    
By default tinydns listen on 127.0.0.1:53 UDP.
 
By default tinydns listen on 127.0.0.1:53 UDP.
   −
In the root subfolder lives the list of known zones. the file /var/services/tinydns/root/data is templated. It is populated using  flat db files hosts and domains.
+
In the root subfolder lives the list of known zones. the file /var/service/tinydns/root/data is templated. It is populated using  flat db files hosts and domains.
    
=== Prefixes: ===
 
=== Prefixes: ===
Line 58: Line 58:     
== DNScache ==
 
== DNScache ==
Dnscache is the service listening to dns query from LAN and localhost. It listens on localIP:53 TCP and UDP. Youcan alter that using the ListenIP property, it also listen to all IP, but this can be altered using SendIP property. It resides in /var/services/dnscache. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision. in root/ip subdirectory are ip authorized to query to the cache. In root/servers/ are a list of domains the cache knows where to query. If a file exist for the needed domain, then dnscache query to one of the DNS server in the file. If a domain is not stated there, then dnscache looks to the file @. As a default it redirects to dnscache.forwarder 127.0.0.2:53 . All SME locally handled domains have a file there and the server inside the file is the tinidns service address: 127.0.0.1
+
Dnscache is the service listening to dns query from LAN and localhost. It listens on localIP:53 TCP and UDP. Youcan alter that using the ListenIP property, it also listen to all IP, but this can be altered using SendIP property. It resides in /var/service/dnscache. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision. in root/ip subdirectory are ip authorized to query to the cache. In root/servers/ are a list of domains the cache knows where to query. If a file exist for the needed domain, then dnscache query to one of the DNS server in the file. If a domain is not stated there, then dnscache looks to the file @. As a default it redirects to dnscache.forwarder 127.0.0.2:53 . All SME locally handled domains have a file there and the server inside the file is the tinidns service address: 127.0.0.1
    
== DNScache.forwarder ==
 
== DNScache.forwarder ==
Dnscache is the service listening to dns query from LAN and localhost. It listens on 127.0.0.2:53 UDP. It resides in /var/services/dnscache. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision. in root/ip subdirectory are ip authorized to query to the cache (only 127.*). In root/servers/ are a list of domains the cache knows where to query. First you see the generik @. As a default it redirects to a list of ROOT DNS seeds. If dnscache properties Forwarder and Forwarder2 exists then the list is replaced by those values. And the second file is "127.in-addr.arpa" that redirects to tinydns.
+
Dnscache.forwarder is the service listening to dns query from LAN and localhost. It listens on 127.0.0.2:53 UDP. It resides in /var/service/dnscache.forwarder. It is supervised by runit. So you can find a "run" script there where all the recipe to launch the service is. As per SME 10, the instance is called by a systemd service unit, but still under runit supervision. in root/ip subdirectory are ip authorized to query to the cache (only 127.*). In root/servers/ are a list of domains the cache knows where to query. First you see the generik @. As a default it redirects to a list of ROOT DNS seeds. If dnscache properties Forwarder and Forwarder2 exists then the list is replaced by those values. And the second file is "127.in-addr.arpa" that redirects to tinydns.
    
== Use cases ==
 
== Use cases ==
 +
 +
=== I want to define a remote DNS server for a domain ===
 +
<syntaxhighlight lang="bash">
 +
config set myremotedomaine.cc domain-remote Nameservers=IP1,IP2
 +
config set myremotedomaine.com domain-remote Nameservers=IP3
 +
</syntaxhighlight>
 +
    
=== I want to add a pihole ===
 
=== I want to add a pihole ===
If you wan to add a pinhole to remove some ads. The easy solution is to put it as dnsache Forwarder property, but the result is you might get generik results for your server. <syntaxhighlight lang="bash">
+
If you wan to add a pihole to remove some ads. The easy solution is to put it as dnsache Forwarder property, but the result is you might get generic results for your server. <syntaxhighlight lang="bash">
 
config setprop dnsache Forwarder mypiholeip
 
config setprop dnsache Forwarder mypiholeip
 
</syntaxhighlight>
 
</syntaxhighlight>
      −
Another option could be to play at the dhcpd level and do not mess with the server but, this will prevent the lan pc to get local domains from the SME, unless you then specify to the pihole to ask to your sme for known local domains...
+
Another option could be to play at the dhcpd level and do not mess with the server but, this will prevent the lan pc to get local domains from the SME, unless you then specify to the pihole to ask to your sme for known local domains. See [[Pihole]]
 
<br />
 
<br />
  
19

edits

Navigation menu