Could not dump example.come zone: zone example.com/IN: NS 'ns1.example.com' has no address records (A or AAAA)

  • @Starlight


    In that case, you shouldn't use the contrib/Listeners/Named/10_named_override_default_ns_rr.pl listener anyway because that listener still add the glue records in all zones which means out of zone data...


    Best would be to use your own listener implementing all parts:


    Listen on the beforeNamedAddDmnDb instead of the afterNamedAddDmnDb and then:

    • Override the SOA record with a substitution
    • Set your own NS entries using the i-MSCP built-in template parser
    • Set your own glue records using the i-MSCP built-in template parser
    • Remove the dmn NS entry block using the i-MSCP built-in template parser (This would allows to discard any further treatment by the Bind9 server implementation regarding this block; block not processed because missing)
    • Remove the dmn NS A entry block using the i-MSCP built-in template parser (This would allows to discard any further treatment by the Bind9 server implementation regarding this block; block not processed because missing)

    If you code that listener, we could push it and remove the contrib/Listeners/Named/10_named_override_default_ns_rr.pl listener file.


    If you don't, I'll code it.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Starlight


    I'm ending with a listener file such as 10_global_ns.pl


    Be aware that I've not tested it. it was fully written without any test other than those made in my head.


    Edit: New pastbin link (typo issues)
    Edit: Again a new pastbin link (typo issues)
    Edit: Again a new pastbin link (typo issues)
    Edit: Again a new new pastbin link ($ORIGIN must not be used for NS entries)
    Edit: Again a new pastbin link (typo issues)
    Edit: Replaced pastbin link by gist
    Edit: The listener is now available in the 1.3.x branch (see below).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Dear @Nuxwin, great effort and faster than me. However, I have some points where I doubt, that it will work as intended:


    1) Line 36: I guess, it should be an array definition with equal instead of an arrow
    2) Line 70: $nsNumber should start with 1, there should not be an ns0. However, I would make it configurable, if people want to start with e.g. ns3
    3) Line 69: the for $ipAddrType is run twice and will add each ns two times in $nsRecordEntries
    4) The namespace is actually named instead of bind9


    I did not had the time to fix the third flaw.

  • @Starlight


    I'll test it anyway if you have no time this evening.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Starlight


    I've tested and it works ;)


    My listener config for that test:


    Perl
    1. my $ZONE_NAME = 'panel.bbox.nuxwin.com';
    2. my @NS_IPS = (
    3. '<my_ip>', # MASTER DNS IP (IPv4)
    4. );


    Here, $ZONE_NAME is the value of BASE_SERVER_VHOST (panel host).


    Result after creating a new customer account (here testme.com)


    dns_01.png


    And for the panel zone


    dns_02.png

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Starlight


    The new listener that allows to set identical NS entries in all zones has been pushed in our repository (1.3.x branch). See https://github.com/i-MSCP/imsc…2f2ab2782b9e9dfdb0cd62625


    Be aware that this listener file is only compatible with i-MSCP Serie 1.3.x (version >= 1.3.8 which has not been released yet).


    Since the last shoot, the listener has been improved a bit to allow arbitrary NS names. This is mostly needed when you use slave DNS servers that are out of your hands, such as the slave DNS servers of your registrar.


    I appreciated all your efforts and also your patience to help us to improve i-MSCP. That is much appreciated.


    Thank you.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hey @Nuxwin, first of all, I need to thank you, having the patience to explain me, how the listeners work (I can use this to work on plugins whenever I find the time) and secondly about your impatience to do my part of the work. ;)


    Great work. And for sure, I help improving (or at least complaining about bugs), since I use the software and open source should work like this!


    Edit: @Nuxwin, which changes make them only work with i-MSCP 1.3.x? I would like to run it on my current 1.3.7 already and therefore modify it. Thanks!

    Edited once, last by Starlight ().

  • and secondly about your impatience to do my part of the work.

    :D



    which changes make them only work with i-MSCP 1.3.x? I would like to run it on my current 1.3.7 already and therefore modify it.

    I've changed the db.tpl template file to allow arbitrary NS names. The ns prefix is no longer hardcoded in the template file. I'll provide you with a version compatible with i-MSCP 1.3.7 but be aware that ns names will be fixed because the ns prefix is hardcoded in the db.tpl file. Give me some minutes.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206