Hi the API function dns_templatezone_add sets server_id from client field "default_dnsserver", see below Code: public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email) { global $app, $conf; if(!$this->checkPerm($session_id, 'dns_templatezone_add')) { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM client WHERE client_id = ?", $client_id); $server_id = $client["default_dnsserver"]; The value of $client["default_dnsserver"] is 0 and hence no server will be assigned to the zone created from the API. I cant find anywhere in the ISP GUI to set "default_dnsserver". The Limit (Custom) seetings for the client is as follows: https://xxa.se/i/1lqtl34ioa4z005ls7n.png The listed servers as "DNS servers:" are stored in the db as a ',' delimited list in field "dns_servers", but nowhere on the page can I find how "default_dnsserver" is set. Where do I set "default_dnsserver" or is it obsolete? If the latter, there will problems with the API. Furthermore, the other default_web/db etc., are these used or obsolete? Kind regards Lennart
You can set the default dns server under System -> Main Config -> DNS It is currently not possible to set this on a client base, only globally.
Ok, but that does not set the default_dnsserver field in the client table, from which the function dns_templatezone_add() fetches the value. Hence I need to fix that in the API code with function client_update(). No problem to do that, as long as ISPConfig as such does not use this field.
I see. Yes, the API function should be fixed. If you want, you can create a MR at git.ispconfig.org so we can include the fix in a upcoming version.