contabo: fix DNS

we disable the DNS servers in initializeBaseImage. On normal VPS,
unbound seems to start by itself but on contabo it doesn't because
the default unbound config on ubuntu does not work without ip6
This commit is contained in:
Girish Ramakrishnan
2018-12-21 11:40:45 -08:00
parent ecd1d69863
commit 5146e39023
3 changed files with 11 additions and 3 deletions
+6
View File
@@ -126,3 +126,9 @@ systemctl disable postfix || true
systemctl stop systemd-resolved || true
systemctl disable systemd-resolved || true
# ubuntu's default config for unbound does not work if ipv6 is disabled. this config is overwritten in start.sh
# we need unbound to work as this is required for installer.sh to do any DNS requests
ip6=[[ -s /proc/net/if_inet6 ]] && echo "yes" || echo "no"
echo -e "server:\n\tinterface: 127.0.0.1\n\tdo-ip6: ${ip6}" > /etc/unbound/unbound.conf.d/cloudron-network.conf
systemctl restart unbound