From df65dc89b428c8f66ee2203f4a14eb2592d89ee0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 30 Mar 2018 20:49:16 +0200 Subject: examples/var_service: new example: dnsmasq service Signed-off-by: Denys Vlasenko --- examples/var_service/dnsmasq/README | 10 ++++ examples/var_service/dnsmasq/dnsmasq.conf | 76 ++++++++++++++++++++++++ examples/var_service/dnsmasq/log/run | 21 +++++++ examples/var_service/dnsmasq/p_log | 4 ++ examples/var_service/dnsmasq/run | 12 ++++ examples/var_service/dnsmasq/w_log | 4 ++ examples/var_service/fw/etc/dnsmasq_servers.conf | 38 ++++++++++++ 7 files changed, 165 insertions(+) create mode 100644 examples/var_service/dnsmasq/README create mode 100644 examples/var_service/dnsmasq/dnsmasq.conf create mode 100755 examples/var_service/dnsmasq/log/run create mode 100755 examples/var_service/dnsmasq/p_log create mode 100755 examples/var_service/dnsmasq/run create mode 100755 examples/var_service/dnsmasq/w_log create mode 100644 examples/var_service/fw/etc/dnsmasq_servers.conf diff --git a/examples/var_service/dnsmasq/README b/examples/var_service/dnsmasq/README new file mode 100644 index 000000000..a20740d6e --- /dev/null +++ b/examples/var_service/dnsmasq/README @@ -0,0 +1,10 @@ +Local DNS cache service. + +This service is useful if you have more than 3 DNS servers, +or if you need a finer-grained control of which servers +can serve which domain. + +To make programs use local DNS server, make sure +/etc/resolv.conf says: + +nameserver 127.0.0.1 diff --git a/examples/var_service/dnsmasq/dnsmasq.conf b/examples/var_service/dnsmasq/dnsmasq.conf new file mode 100644 index 000000000..2cfb0fe81 --- /dev/null +++ b/examples/var_service/dnsmasq/dnsmasq.conf @@ -0,0 +1,76 @@ +keep-in-foreground + +# "-" is stderr: +log-facility=- + +# May also try log-queries=extra +log-queries + +# No param = pidfile disabled: +pid-file + +interface=lo +listen-address=127.0.0.1 +bind-interfaces + +cache-size=999 + +servers-file=/etc/dnsmasq_servers.conf + +# Don’t read /etc/resolv.conf and /etc/hosts: +no-resolv +#no-hosts + +# All reverse lookups for private IP ranges (ie 192.168.x.x, etc) +# which are not found in /etc/hosts or the DHCP leases file are +# answered with "no such domain" rather than being forwarded +# upstream. The set of prefixes affected is the list given in +# RFC6303. +#bogus-priv + +#−T, --local-ttl=