Unable to choose a secondary DNS server by Clients and resellers

Discussion in 'General' started by holykim, Jul 16, 2019.

  1. holykim

    holykim Member

    Hi team,

    I have three DNS servers, one primary (NS1) and two secondaries (NS2, NS3).
    The admin can choose a secondary DNS server when add a new secondary DNS zone. However, clients and resellers are unable to choose a secondary DNS server as there is no field available on the page.

    The situation is below.
    1. I assigned a NS2 as a default secondary DNS server to the reseller1.
    2. Reseller1 can create a secondary DNS zone without choose a secondary DNS server.
    3. DNS zone on NS2 created without an issue but the reseller1 is unable to create a DNS zone on NS3 as ISPConfig doesn't allow they choose a secondary DNS server.

    I tried to add NS2, NS3 as DNS servers to the reseller1 but nothing changed.

    OS : CentOS 6, 7 (We have multiple servers)
    ISPConfig 3.1.14

    FYI, I haven't tried this with the previous versions.

    Thanks in advance and I appreciate your great support!

    Many Thanks

    Harry
     
    Last edited: Jul 16, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Are your DNS servers controlled by ISPConfig? My DNS setup has name servers as members of ISPConfig multiserver setup, and name servers 2 and 3 are mirrors of the first. So they have same zones and same name service contents all the time.
    I have not set up any secondary DNS zones.
     
  3. holykim

    holykim Member

    Hi Taleman
    Thank you for your reply.
    Yes
    All my DNS servers are member of ISPConfig multiserver setup.
    ISPConfig sync DNS zone file between primary and secondary name servers if primary zone file has been updated.
    My question was not finding an alternative and want to know the reason why the function doesn't work properly. This may help ISPConfig fixes a bug if it is.

    Many Thanks
    Harry
     
  4. holykim

    holykim Member

    I had a chance to see few files below and found that ISPConfig seems to be designed support only one Secondary DNS server which set as a Default Secondary DNS server for a reseller.
    Code:
    /usr/local/ispconfig/interface/web/dns/templates/dns_slave_edit.htm
    /usr/local/ispconfig/interface/web/dns/dns_slave_edit.php
    
    With just few modification on the above files I was able to allow resellers can choose a secondary DNS server when they create it but it was a just temporary solution.
    Code:
    1. Add html code below to line 33 in /usr/local/ispconfig/interface/web/dns/templates/dns_slave_edit.htm
                    <!-- add start -->
                    <div class="form-group">
                        <tmpl_if name="edit_disabled">
                            <label for="server_id_disabled" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label>
                            <div class="col-sm-9"><select name="server_id_disabled" id="server_id_disabled" class="form-control" disabled="disabled">
                                {tmpl_var name='server_id'}
                            </select></div>
                            <input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
                        <tmpl_else>
                                <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label>
                                <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control">
                                    {tmpl_var name='server_id'}
                                </select></div>
                        </tmpl_if>
                    </div>
                    <!-- add end -->
    
    2. Comment out line 193
                    //$this->dataRecord["server_id"] = $client["default_slave_dnsserver"];
    in /usr/local/ispconfig/interface/web/dns/dns_slave_edit.php
    
    To display all the information correctly without empty field on the page of dns_slave_list.htm, I found something has to be changed like an idea below. I believe this is not a priority and this is just needed for ISPConfig is fully functional even though minor things.

    The type of the 'default_slave_dnsserver' in the 'client' table is int(11) so the 'client' table needs a new field, 'slave_dns_servers' with 'text' type just like 'dns_servers' and an Admin assigns slave DNS servers to a reseller just like assigning DNS Server. Of course, few code modification is required.

    I also found minor CSS issues on the pages logging with a reseller ID. I will report this later.
     
  5. Jesse Norell

    Jesse Norell Well-Known Member

    Could you wrap this up into a clean merge request in gitlab? Likely it would be accepted into an upcoming release.
     
    holykim likes this.

Share This Page