Custom-DNS Standard-Einträge

  • Hallo zusammen,


    ich habe übers Wochenende einen neuen Server installiert, der alte muss endlich ersetzt werden.

    Debian 9.4 Stretch

    i-Mscp Git 1.5.x

    PHP 5.6.36


    Nun teste ich gerade den DNS-Server (bind9). Dabei bin ich auf ein Problem gestoßen, das die Custom-DNS-Einträge betrifft.

    Mit großer Überraschung habe ich festgestellt, dass die MX-, bzw Mail-Einträge per Konpfdruck entfernt werden können. Das ist genial. :thumbsup:


    Zunächst muss ich erwähnen, dass ich die Templates (db.tpl und db_sub.tpl) angepasst habe, um die CNAME-Einträge für WWW raus zu bekommen. Diese sind jetzt „normale“ A-Eingräge. Das funktioniert auch so wie es soll, solange ich den WWW-Eintrag nicht anpassen muss.

    Hier meine angepassten Templates


    Nun muss aber, der einen oder anderen Kunden, den Standard WWW-Eintrag ändern. Ich bin zwar auf den Listener „10_named_override_default_rr.pl“ gestoßen, aber der löscht ja nur den vorhandenen Default CNAME-Eintrag.

    Ich habe nun versucht den Listener anzupassen aber da ich ein PHP-Newbee bin, beiße ich im Moment auf Granit. ;)


    Kann mir bitte jemand sagen wie ich die "10_named_override_default_rr.pl" umschreiben muss, damit der WWW-Eintrag als A-Eintrag gelöscht wird?


    Danke

  • swoop


    Before giving you an answer, I want be sure to understand well.


    1. You have modified the default i-MSCP's bind9 DNS templates to replace the default www CNAME resource records by A (or AAAA for an IPv6) resource records
    2. However, you still want use the 10_named_override_default_rr.pl i-MSCP listener file which in your use case should also remove the default www A (or AAAA for an IPv6) resource record

    I understdood well:?:


    BTW: Why did you turned the default www CNAME resource record into into A (or AAAA for an IPv6) resource record :?:


    Nun muss aber, der einen oder anderen Kunden, den Standard WWW-Eintrag ändern. Ich bin zwar auf den Listener „10_named_override_default_rr.pl“ gestoßen, aber der löscht ja nur den vorhandenen Default CNAME-Eintrag.


    Ich habe nun versucht den Listener anzupassen aber da ich ein PHP-Newbee bin, beiße ich im Moment auf Granit.

    i-MSCP listener files are written in Perl, not PHP ;)

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

  • hello Nuxwin,


    thanx for your fast answer.


    1. Yes, you understand it right.

    2. If you know a better/easier way, please let me know

    I want to be able to directly edit a IP-Address, not thru a CNAME. It's an Entry more if internaly.

    I've tested 10_named_override_default_rr.pl without changing anything but now i have 3 WWW entries in my zonefile.

    One created by the template,

    one created by me,

    and one created by 10_named_override_default_rr.pl


    Zonefile looks like this


    Sorry, i mean perl. Ether way i am not a programmer. :blush:

    Edited once, last by swoop ().

  • I've tested 10_named_override_default_rr.pl without changing anything but now i have 3 WWW entries in my zonefile.


    One created by the template,

    one created by me,

    and one created by 10_named_override_default_rr.pl

    To resume, you want only that entry: www.domain.tld. 3600 IN A 10.11.15.104


    If yes, give me some time to send you a modified version of the listener for such use case.

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

  • Good Morning Nuxwin,


    yes, you are absolutly right.


    thank you very much

    Good work by th way.

  • swoop


    Can you give a try with the version provided below? You will surely have to trigger i-MSCP reconfiguration: perl /var/www/imscp/engine/setup/imscp-reconfigure -danv to make changes effectives.


    Let's me know if that version solve your specific use case. It is of course assumed here that www rr are expected as A (or AAAA) rr according changes made in the bind9 DNS templates.

    Files

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

  • thans for the fast reply.

    after i've done as described the zonefile looks like this

    after i added my own WWW entry, the zonefile looks like this


    it's working partly, the original WWW entry was not deleted, and i get no error-message. Thats grat.

  • swoop


    I'll provide you with a revised version ASAP.

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

  • hello Nuxwin,


    is there light at the end of the tunnel? :shy:

    til you come with a genius soltion for my problem, is there a way to edit/change DNS-settings on commandline, so i can go live with my new server?

    or should i wait until the final solution?


    thanks