diff --git a/admin_configfiles.php b/admin_configfiles.php index efbeba7a..c5e38a88 100644 --- a/admin_configfiles.php +++ b/admin_configfiles.php @@ -30,6 +30,19 @@ if ($userinfo['change_serversettings'] == '1') { $customer_tmpdir = Settings::Get('phpfpm.tmpdir'); } + // try to convert namserver hosts to ip's + $ns_ips = ""; + if (Settings::Get('system.nameservers') != '') { + $nameservers = explode(',', Settings::Get('system.nameservers')); + foreach ($nameservers as $nameserver) { + $nameserver = trim($nameserver); + $nameserver_ips = gethostbynamel($nameserver); + if (is_array($nameserver_ips) && count($nameserver_ips) > 0) { + $ns_ips .= implode(",", $nameserver_ips); + } + } + } + $replace_arr = Array( '' => $sql['user'], '' => 'MYSQL_PASSWORD', @@ -39,6 +52,8 @@ if ($userinfo['change_serversettings'] == '1') { '' => Settings::Get('system.hostname'), '' => Settings::Get('system.ipaddress'), '' => Settings::Get('system.nameservers'), + '' => $ns_ips, + '' => Settings::Get('system.axfrservers'), '' => Settings::Get('system.vmail_homedir'), '' => Settings::Get('system.vmail_uid'), '' => Settings::Get('system.vmail_gid'), diff --git a/lib/configfiles/gentoo.xml b/lib/configfiles/gentoo.xml index 69b4dd8d..cbcda2db 100644 --- a/lib/configfiles/gentoo.xml +++ b/lib/configfiles/gentoo.xml @@ -396,7 +396,8 @@ mail IN A ################################# # allow-axfr-ips Allow zonetransfers only to these subnets # -allow-axfr-ips=127.0.0.0/8,::1, +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges. @@ -938,7 +939,8 @@ gmysql-password= ################################# # allow-axfr-ips Allow zonetransfers only to these subnets # -allow-axfr-ips=127.0.0.0/8,::1, +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges. diff --git a/lib/configfiles/jessie.xml b/lib/configfiles/jessie.xml index 99322e4b..d6613020 100644 --- a/lib/configfiles/jessie.xml +++ b/lib/configfiles/jessie.xml @@ -380,7 +380,8 @@ exit "$RETVAL" ################################# # allow-axfr-ips Allow zonetransfers only to these subnets # -allow-axfr-ips=127.0.0.0/8,::1, +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges. @@ -921,7 +922,8 @@ gmysql-password= ################################# # allow-axfr-ips Allow zonetransfers only to these subnets # -# allow-axfr-ips=127.0.0.0/8,::1, +# allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges. diff --git a/lib/configfiles/precise.xml b/lib/configfiles/precise.xml index 512415a4..c985a38e 100644 --- a/lib/configfiles/precise.xml +++ b/lib/configfiles/precise.xml @@ -346,7 +346,8 @@ exit "$RETVAL" +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: allow-recursion=127.0.0.1 config-dir=/etc/powerdns daemon=yes @@ -407,7 +408,8 @@ include-dir=/etc/powerdns/froxlor/ +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: #local-ipv6=YOUR_IPv6_(if_any) bind-config=named.conf bind-check-interval=180 diff --git a/lib/configfiles/trusty.xml b/lib/configfiles/trusty.xml index ba8bdc3f..7a7aeb8d 100644 --- a/lib/configfiles/trusty.xml +++ b/lib/configfiles/trusty.xml @@ -379,7 +379,8 @@ exit "$RETVAL" +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: allow-recursion=127.0.0.1 config-dir=/etc/powerdns daemon=yes @@ -417,7 +418,8 @@ gmysql-password= +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: allow-recursion=127.0.0.1 config-dir=/etc/powerdns daemon=yes @@ -441,7 +443,8 @@ include-dir=/etc/powerdns/froxlor/ +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: #local-ipv6=YOUR_IPv6_(if_any) bind-config=named.conf bind-check-interval=180 diff --git a/lib/configfiles/wheezy.xml b/lib/configfiles/wheezy.xml index 9d1d5c21..6e286017 100644 --- a/lib/configfiles/wheezy.xml +++ b/lib/configfiles/wheezy.xml @@ -424,7 +424,8 @@ exit "$RETVAL" # allow-axfr-ips If enabled, restrict zonetransfers to originate from these # IP addresses # -allow-axfr-ips=127.0.0.0/8,::1, +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-recursion List of netmasks that are allowed to recurse @@ -763,7 +764,8 @@ gmysql-password= # allow-axfr-ips If enabled, restrict zonetransfers to originate from these # IP addresses # -allow-axfr-ips= +allow-axfr-ips=127.0.0.0/8,::1, +# add these entries to the list if any speficied: ################################# # allow-recursion List of netmasks that are allowed to recurse