# New Zone! Bundle local-zones: by first two name tiers "abcd.tld."
partial=$( echo "$target" | awk -F. '{ j=NF ; i=j-1; print $i"."$j }' )
UNBOUND_LIST_DOMAINS="$UNBOUND_LIST_DOMAINS $partial"
- echo " local-zone: $partial. transparent" >> $UNBOUND_CONFFILE
+ echo " local-zone: $partial transparent" >> $UNBOUND_CONFFILE
fi
}
echo " control-use-cert: yes"
echo " control-interface: 127.0.0.1"
echo " control-interface: ::1"
- echo " server-key-file: \"$UNBOUND_SRVKEY_FILE\""
- echo " server-cert-file: \"$UNBOUND_SRVPEM_FILE\""
- echo " control-key-file: \"$UNBOUND_CTLKEY_FILE\""
- echo " control-cert-file: \"$UNBOUND_CTLPEM_FILE\""
+ echo " server-key-file: $UNBOUND_SRVKEY_FILE"
+ echo " server-cert-file: $UNBOUND_SRVPEM_FILE"
+ echo " control-key-file: $UNBOUND_CTLKEY_FILE"
+ echo " control-cert-file: $UNBOUND_CTLPEM_FILE"
echo
} >> $UNBOUND_CONFFILE
;;
echo " control-use-cert: yes"
echo " control-interface: 0.0.0.0"
echo " control-interface: ::0"
- echo " server-key-file: \"$UNBOUND_SRVKEY_FILE\""
- echo " server-cert-file: \"$UNBOUND_SRVPEM_FILE\""
- echo " control-key-file: \"$UNBOUND_CTLKEY_FILE\""
- echo " control-cert-file: \"$UNBOUND_CTLPEM_FILE\""
+ echo " server-key-file: $UNBOUND_SRVKEY_FILE"
+ echo " server-cert-file: $UNBOUND_SRVPEM_FILE"
+ echo " control-key-file: $UNBOUND_CTLKEY_FILE"
+ echo " control-cert-file: $UNBOUND_CTLPEM_FILE"
echo
} >> $UNBOUND_CONFFILE
;;
for fdomain in $UNBOUND_LIST_FORWARD ; do
{
echo "forward-zone:"
- echo " name: \"$fdomain.\""
+ echo " name: $fdomain"
for fresolver in $resolvers ; do
echo " forward-addr: $fresolver"
done
{
echo "auth-zone:"
- echo " name: \"$realzone\""
+ echo " name: $realzone"
for server in $axfrservers ; do
- echo " master: \"$server\""
+ echo " master: $server"
done
- echo " url: \"$httpserver$zone.zone\""
+ echo " url: $httpserver$zone.zone"
echo " fallback-enabled: yes"
echo " for-downstream: no"
echo " for-upstream: yes"
- echo " zonefile: \"$zone.zone\""
+ echo " zonefile: $zone.zone"
echo
} >> $UNBOUND_CONFFILE
done
echo
echo "server:"
echo " username: unbound"
- echo " chroot: \"$UNBOUND_VARDIR\""
- echo " directory: \"$UNBOUND_VARDIR\""
- echo " pidfile: \"$UNBOUND_PIDFILE\""
+ echo " chroot: $UNBOUND_VARDIR"
+ echo " directory: $UNBOUND_VARDIR"
+ echo " pidfile: $UNBOUND_PIDFILE"
echo
# No threading
echo " num-threads: 1"
if [ -f "$UNBOUND_HINTFILE" ] ; then
# Optional hints if found
- echo " root-hints: \"$UNBOUND_HINTFILE\"" >> $UNBOUND_CONFFILE
+ echo " root-hints: $UNBOUND_HINTFILE" >> $UNBOUND_CONFFILE
fi
if [ "$UNBOUND_B_DNSSEC" -gt 0 -a -f "$UNBOUND_KEYFILE" ] ; then
{
- echo " auto-trust-anchor-file: \"$UNBOUND_KEYFILE\""
+ echo " auto-trust-anchor-file: $UNBOUND_KEYFILE"
echo
} >> $UNBOUND_CONFFILE
if [ -n "$UNBOUND_LIST_INSECURE" ] ; then
for domain in $UNBOUND_LIST_INSECURE ; do
# Except and accept domains without (DNSSEC); work around broken domains
- echo " domain-insecure: \"$domain\"" >> $UNBOUND_CONFFILE
+ echo " domain-insecure: $domain" >> $UNBOUND_CONFFILE
done
# Hostname as TLD works, but not transparent through recursion
echo " domain-insecure: $UNBOUND_TXT_HOSTNAME"
echo " private-domain: $UNBOUND_TXT_HOSTNAME"
- echo " local-zone: $UNBOUND_TXT_HOSTNAME. static"
+ echo " local-zone: $UNBOUND_TXT_HOSTNAME static"
echo " local-data: \"$UNBOUND_TXT_HOSTNAME. $UNBOUND_XSOA\""
echo " local-data: \"$UNBOUND_TXT_HOSTNAME. $UNBOUND_XNS\""
echo
{
# Do NOT forward queries with your GLA ip6.arpa
echo " domain-insecure: $ifarpa"
- echo " local-zone: $ifarpa. $UNBOUND_D_DOMAIN_TYPE"
+ echo " local-zone: $ifarpa $UNBOUND_D_DOMAIN_TYPE"
echo " local-data: \"$ifarpa. $UNBOUND_XSOA\""
echo " local-data: \"$ifarpa. $UNBOUND_XNS\""
echo
{
# Do NOT forward queries with your ULA ip6.arpa or in-addr.arpa
echo " domain-insecure: $ifarpa"
- echo " local-zone: $ifarpa. $UNBOUND_D_DOMAIN_TYPE"
+ echo " local-zone: $ifarpa $UNBOUND_D_DOMAIN_TYPE"
echo " local-data: \"$ifarpa. $UNBOUND_XSOA\""
echo " local-data: \"$ifarpa. $UNBOUND_XNS\""
echo
# avoid upstream involvement in RFC6762
echo " domain-insecure: local"
echo " private-domain: local"
- echo " local-zone: local. $UNBOUND_D_DOMAIN_TYPE"
+ echo " local-zone: local $UNBOUND_D_DOMAIN_TYPE"
echo " local-data: \"local. $UNBOUND_XSOA\""
echo " local-data: \"local. $UNBOUND_XNS\""
echo " local-data: \"local. 3600 IN TXT RFC6762\""
# type transparent will permit forward-zone: or stub-zone: clauses
echo " domain-insecure: $UNBOUND_TXT_DOMAIN"
echo " private-domain: $UNBOUND_TXT_DOMAIN"
- echo " local-zone: $UNBOUND_TXT_DOMAIN. $UNBOUND_D_DOMAIN_TYPE"
+ echo " local-zone: $UNBOUND_TXT_DOMAIN $UNBOUND_D_DOMAIN_TYPE"
echo " local-data: \"$UNBOUND_TXT_DOMAIN. $UNBOUND_XSOA\""
echo " local-data: \"$UNBOUND_TXT_DOMAIN. $UNBOUND_XNS\""
echo
# likely transparent domain with fordward-zone: clause to next router
echo " domain-insecure: $UNBOUND_TXT_DOMAIN"
echo " private-domain: $UNBOUND_TXT_DOMAIN"
- echo " local-zone: $UNBOUND_TXT_DOMAIN. $UNBOUND_D_DOMAIN_TYPE"
+ echo " local-zone: $UNBOUND_TXT_DOMAIN $UNBOUND_D_DOMAIN_TYPE"
echo
;;
esac