From 195d6b5ce92823c81c4a41b866e5c3edfa2630d3 Mon Sep 17 00:00:00 2001 From: Leo Krueger Date: Sun, 19 Jan 2014 23:29:26 +0100 Subject: [PATCH] added initial files --- general | 19 +++++++++++++++++++ rules | 37 +++++++++++++++++++++++++++++++++++++ updateDnsmasq.sh | 20 ++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 general create mode 100644 rules create mode 100755 updateDnsmasq.sh diff --git a/general b/general new file mode 100644 index 0000000..63330b5 --- /dev/null +++ b/general @@ -0,0 +1,19 @@ +interface=br-ffhh +listen-address=127.0.0.1 +no-dhcp-interface=br-ffhh +no-dhcp-interface=lo +bind-interfaces +except-interface=lo + +log-facility=/var/log/dnsmasq.log + +domain-needed +#bogus-priv ffhh reverse does not work with this enabled +no-resolv +no-hosts + +cache-size=4096 + +# follow the order as defined, so that VPN is used before trying srv01/gw01 +strict-order + diff --git a/rules b/rules new file mode 100644 index 0000000..fca13d9 --- /dev/null +++ b/rules @@ -0,0 +1,37 @@ +# all other queries via vpn +server=85.214.20.141@mullvad # FoeBud +server=213.73.91.35@mullvad # dnscache.berlin.ccc.de +server=fd51:2bb2:fd0d::101 # srv01 +server=fd51:2bb2:fd0d::e01 # and gw01 as backup if vpn is down + +# dn42 +server=/dn42/172.22.0.53 +server=/22.172.in-addr.arpa/172.22.0.53 +server=/23.172.in-addr.arpa/172.22.0.53 + +# ff Augsburg +server=/ffa/10.11.10.15 +server=/ffa/10.11.0.8 + +# ff tlds via srv01 +server=/ffhh/fd51:2bb2:fd0d::101 +server=/ffhl/fd51:2bb2:fd0d::101 +server=/ffki/fd51:2bb2:fd0d::101 +server=/dn42/fd51:2bb2:fd0d::101 +server=/hack/fd51:2bb2:fd0d::101 + +# ff tlds via gw01 +server=/ffhh/fd51:2bb2:fd0d::e01 +server=/ffhl/fd51:2bb2:fd0d::e01 +server=/ffki/fd51:2bb2:fd0d::e01 +server=/dn42/fd51:2bb2:fd0d::e01 +server=/hack/fd51:2bb2:fd0d::e01 + +# ff reverse via srv01 +server=/112.10.in-addr.arpa/fd51:2bb2:fd0d::101 +server=/d.0.d.f.2.b.b.2.1.5.d.f.ip6.arpa/fd51:2bb2:fd0d::101 + +# ff reverse via gw01 +server=/112.10.in-addr.arpa/fd51:2bb2:fd0d::e01 +server=/d.0.d.f.2.b.b.2.1.5.d.f.ip6.arpa/fd51:2bb2:fd0d::e01 + diff --git a/updateDnsmasq.sh b/updateDnsmasq.sh new file mode 100755 index 0000000..25ff966 --- /dev/null +++ b/updateDnsmasq.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Simple script to update the dnsmasq files from git + +# CONFIGURE THIS TO YOUR GIT DIRECTORY +GIT_REPO=/home/ffdnsmasq/dnsmasq + +# CONFIGURE THIS TO THE USER TO RUN THE GIT COMMANDS AS +USER=ffdnsmasq + +cd $GIT_REPO + +su -c "git pull" $USER + +if [ ! cmp $GIT_REPO/rules /etc/dnsmasq.d/rules >/dev/null 2>&1 ] || [ ! cmp $GIT_REPO/general /etc/dnsmasq.d/general >/dev/null 2>&1 ]; +then + cp $GIT_REPO/rules /etc/dnsmasq.d/rules + cp $GIT_REPO/general /etc/dnsmasq.d/general + + /usr/sbin/service dnsmasq restart +fi