From 6deb2e04bd4066e0423c3fff8d7ddddf19f8ae46 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Wed, 21 Sep 2016 22:41:15 +0100 Subject: dnsmasq and dnscrypt revision --- tools/conf/etc/dnsmasq.conf | 116 +- tools/conf/etc/hosts.dnsmasq | 40458 ++++++++++++++++++++++++----------- tools/conf/etc/rc.d/dnscrypt-proxy | 54 + tools/dnsmasq.html | 26 +- tools/index.html | 4 +- 5 files changed, 28656 insertions(+), 12002 deletions(-) create mode 100755 tools/conf/etc/rc.d/dnscrypt-proxy diff --git a/tools/conf/etc/dnsmasq.conf b/tools/conf/etc/dnsmasq.conf index f4dda54..35d75c8 100644 --- a/tools/conf/etc/dnsmasq.conf +++ b/tools/conf/etc/dnsmasq.conf @@ -7,7 +7,7 @@ # Listen on this specific port instead of the standard DNS port # (53). Setting this to zero completely disables DNS function, # leaving only DHCP and/or TFTP. -#port=53 +#port=5353 # The following two options make you a better netizen, since they # tell dnsmasq to filter out queries which the public DNS cannot @@ -17,7 +17,6 @@ # Never forward plain names (without a dot or domain part) domain-needed - # Never forward addresses in the non-routed address spaces. bogus-priv @@ -29,8 +28,8 @@ proxy-dnssec # Replies which are not DNSSEC signed may be legitimate, because the domain # is unsigned, or may be forgeries. Setting this option tells dnsmasq to -# check that an unsigned reply is OK, by finding a secure proof that a DS -# record somewhere between the root and the domain does not exist. +# check that an unsigned reply is OK, by finding a secure proof that a DS +# record somewhere between the root and the domain does not exist. # The cost of setting this is that even queries in unsigned domains will need # one or more extra DNS queries to verify. #dnssec-check-unsigned @@ -45,14 +44,14 @@ proxy-dnssec # Change this line if you want dns to get its upstream servers from # somewhere other that /etc/resolv.conf -# resolv-file=/etc/resolv.conf.dnsmasq +#resolv-file= # By default, dnsmasq will send queries to any of the upstream # servers it knows about and tries to favour servers to are known # to be up. Uncommenting this forces dnsmasq to try each query # with each server strictly in the order they appear in # /etc/resolv.conf -# strict-order +#strict-order # If you don't want dnsmasq to read /etc/resolv.conf or any other # file, getting its servers from this file instead (see below), then @@ -65,32 +64,22 @@ no-poll # Add other name servers here, with domain specs if they are for # non-public domains. +#server=/localnet/192.168.0.1 server=127.0.0.1#40 +#server=213.73.91.35 # Example of routing PTR queries to nameservers: this will send all # address->name queries for 192.168.3/24 to nameserver 10.1.2.3 #server=/3.168.192.in-addr.arpa/10.1.2.3 -# Send all querys to local dnscrypt -#server=127.0.0.1#2053 -# Use OpenNIC servers -#server=173.230.156.28 -#server=23.226.230.72 -#server=208.115.243.35 -#server=69.164.196.21 - # Add local-only domains here, queries in these domains are answered # from /etc/hosts or DHCP only. -local=/c13/ +#local=/localnet/ # Add domains which you want to force to an IP address here. # The example below send any host in double-click.net to a local # web-server. -address=/c13.nark.biz.tm/192.168.1.254 -address=/c13.nark.biz.tm/192.168.1.254 - -address=/double-click.net/127.0.0.1 -#address=/facebook.com/127.0.0.1 +#address=/double-click.net/127.0.0.1 # --address (and --server) work with IPv6 addresses too. #address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 @@ -117,20 +106,16 @@ address=/double-click.net/127.0.0.1 # specified interfaces (and the loopback) give the name of the # interface (eg eth0) here. # Repeat the line for more than one interface. -interface=lo -interface=wlp2s0 - +#interface= # Or you can specify which interface _not_ to listen on #except-interface= # Or which to listen on by address (remember to include 127.0.0.1 if # you use this.) -listen-address=127.0.0.1 -listen-address=10.0.0.254 - +#listen-address= # If you want dnsmasq to provide only DNS service on an interface, # configure it as shown above, and then use the following line to # disable DHCP and TFTP on it. -no-dhcp-interface=lo +#no-dhcp-interface= # On systems which support it, dnsmasq binds the wildcard address, # even when it is listening on only some interfaces. It then discards @@ -139,18 +124,19 @@ no-dhcp-interface=lo # want dnsmasq to really bind only the interfaces it is listening on, # uncomment this option. About the only time you may need this is when # running another nameserver on the same machine. -bind-interfaces +#bind-interfaces # If you don't want dnsmasq to read /etc/hosts, uncomment the # following line. #no-hosts # or if you want it to read another file, as well as /etc/hosts, use # this. +#addn-hosts=/etc/banner_add_hosts addn-hosts=/etc/hosts.dnsmasq # Set this (and domain: see below) if you want to have a domain # automatically added to simple names in a hosts-file. -expand-hosts +#expand-hosts # Set the domain for dnsmasq. this is optional, but if it is set, it # does the following things. @@ -159,7 +145,7 @@ expand-hosts # 2) Sets the "domain" DHCP option thereby potentially setting the # domain of all systems configured by DHCP # 3) Provides the domain part for "expand-hosts" -domain=c13.nark.biz.tm +#domain=thekelleys.org.uk # Set a different domain for a particular subnet #domain=wireless.thekelleys.org.uk,192.168.2.0/24 @@ -173,7 +159,6 @@ domain=c13.nark.biz.tm # repeat this for each network on which you want to supply DHCP # service. #dhcp-range=192.168.0.50,192.168.0.150,12h -dhcp-range=10.0.0.1,10.0.0.253,6h # This is an example of a DHCP range where the netmask is given. This # is needed for networks we reach the dnsmasq DHCP server via a relay @@ -202,11 +187,11 @@ dhcp-range=10.0.0.1,10.0.0.253,6h #dhcp-range=1234::2, 1234::500, 64, 12h # Do Router Advertisements, BUT NOT DHCP for this subnet. -#dhcp-range=1234::, ra-only +#dhcp-range=1234::, ra-only # Do Router Advertisements, BUT NOT DHCP for this subnet, also try and -# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack -# hosts. Use the DHCPv4 lease to derive the name, network segment and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and # MAC address and assume that the host will also have an # IPv6 address calculated using the SLAAC alogrithm. #dhcp-range=1234::, ra-names @@ -229,9 +214,9 @@ dhcp-range=10.0.0.1,10.0.0.253,6h #dhcp-range=1234::, ra-stateless, ra-names # Do router advertisements for all subnets where we're doing DHCPv6 -# Unless overriden by ra-stateless, ra-names, et al, the router +# Unless overriden by ra-stateless, ra-names, et al, the router # advertisements will have the M and O bits set, so that the clients -# get addresses and configuration from DHCPv6, and the A bit reset, so the +# get addresses and configuration from DHCPv6, and the A bit reset, so the # clients don't use SLAAC addresses. #enable-ra @@ -270,6 +255,13 @@ dhcp-range=10.0.0.1,10.0.0.253,6h # the IP address 192.168.0.60 #dhcp-host=id:01:02:02:04,192.168.0.60 +# Always give the Infiniband interface with hardware address +# 80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:28:05:81 the +# ip address 192.168.0.61. The client id is derived from the prefix +# ff:00:00:00:00:00:02:00:00:02:c9:00 and the last 8 pairs of +# hex digits of the hardware address. +#dhcp-host=id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81,192.168.0.61 + # Always give the host with client identifier "marjorie" # the IP address 192.168.0.60 #dhcp-host=id:marjorie,192.168.0.60 @@ -297,11 +289,11 @@ dhcp-range=10.0.0.1,10.0.0.253,6h # any machine with Ethernet address starting 11:22:33: #dhcp-host=11:22:33:*:*:*,set:red -# Give a fixed IPv6 address and name to client with +# Give a fixed IPv6 address and name to client with # DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 # Note the MAC addresses CANNOT be used to identify DHCPv6 clients. # Note also the they [] around the IPv6 address are obilgatory. -#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] # Ignore any clients which are not specified in dhcp-host lines # or /etc/ethers. Equivalent to ISC "deny unknown-clients". @@ -357,13 +349,21 @@ dhcp-range=10.0.0.1,10.0.0.253,6h # Send DHCPv6 option. Note [] around IPv6 addresses. #dhcp-option=option6:dns-server,[1234::77],[1234::88] -# Send DHCPv6 option for namservers as the machine running +# Send DHCPv6 option for namservers as the machine running # dnsmasq and another. #dhcp-option=option6:dns-server,[::],[1234::88] # Ask client to poll for option changes every six hours. (RFC4242) #dhcp-option=option6:information-refresh-time,6h +# Set option 58 client renewal time (T1). Defaults to half of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T1:1m + +# Set option 59 rebinding time (T2). Defaults to 7/8 of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T2:2m + # Set the NTP time server address to be the same machine as # is running dnsmasq #dhcp-option=42,0.0.0.0 @@ -505,6 +505,9 @@ dhcp-range=10.0.0.1,10.0.0.253,6h # Set the root directory for files available via FTP. #tftp-root=/var/ftpd +# Do not abort if the tftp-root is unavailable +#tftp-no-fail + # Make the TFTP server more secure: with this set, only files owned by # the user dnsmasq is running as will be send over the net. #tftp-secure @@ -536,7 +539,7 @@ dhcp-range=10.0.0.1,10.0.0.253,6h # The DHCP server needs somewhere on disk to keep its lease database. # This defaults to a sane location, but if you want to change it, use # the line below. -dhcp-leasefile=/var/lib/dhcp/dnsmasq.leases +# dhcp-leasefile=/var/lib/dhcp/dnsmasq.leases # Set the DHCP server to authoritative mode. In this mode it will barge in # and take over the lease for any client which broadcasts on the network, @@ -555,40 +558,17 @@ dhcp-leasefile=/var/lib/dhcp/dnsmasq.leases #dhcp-script=/bin/echo # Set the cachesize here. -cache-size=100000 +cache-size=30000 # If you want to disable negative caching, uncomment this. -#no-negcache +no-negcache # Normally responses which come from /etc/hosts and the DHCP lease # file have Time-To-Live set as zero, which conventionally means # do not cache further. If you are happy to trade lower load on the # server for potentially stale date, you can set a time-to-live (in # seconds) here. -local-ttl=30 - -# Negative replies from upstream servers normally contain time-to-live -# information in SOA records which dnsmasq uses for caching. If the -# replies from upstream servers omit this information, dnsmasq does not -# cache the reply. This option gives a default value for time-to-live -# (in seconds) which dnsmasq uses to cache negative replies even in the -# absence of an SOA record. -neg-ttl=6400 - -# Set a maximum TTL value that will be handed out to clients. The specified -# maximum TTL will be given to clients instead of the true TTL value if it -# is lower. The true TTL value is however kept in the cache to avoid flooding -# the upstream DNS servers. -max-ttl=6400 - -# Set a maximum TTL value for entries in the cache. -#max-cache-ttl=