mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-18 23:12:59 +02:00
unbound: Set domains with local data into type transparent mode
Records which are from the same domain than the IPFire hostname might not be returned by unbound. This change explicitely instructs unbound to check local data before checking the global DNS. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
e4013c9dab
commit
1b6b8d97aa
@@ -72,8 +72,18 @@ write_hosts_conf() {
|
||||
echo "local-data: \"${address} ${LOCAL_TTL} IN PTR ${HOSTNAME}\""
|
||||
done
|
||||
|
||||
# Add all hosts
|
||||
local enabled address hostname domainname generateptr
|
||||
|
||||
# Find all unique domain names
|
||||
while IFS="," read -r enabled address hostname domainname generateptr; do
|
||||
[ "${enabled}" = "on" ] || continue
|
||||
|
||||
echo "${domainname}"
|
||||
done < /var/ipfire/main/hosts | sort -u | while read -r domainname; do
|
||||
echo "local-zone: ${domainname} typetransparent"
|
||||
done
|
||||
|
||||
# Add all hosts
|
||||
while IFS="," read -r enabled address hostname domainname generateptr; do
|
||||
[ "${enabled}" = "on" ] || continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user