Zonetransfer listener: 403 forbidden

  • Hello!


    I hope someone have an idea how to solve my problem.


    I'm using i-MSCP 1.2.11 with the zone transfer listener from the contrib directory.


    My second name server is configured like in this tutorial: Listener::Named::Zonetransfer - Zonetransfer to Secondary Nameserver + Howto


    When I want to run the syncdns.sh I get this:


    Code
    1. HTTP request sent, awaiting response... 403 Forbidden
    2. 2016-01-15 00:02:44 ERROR 403: Forbidden.

    I already added both name servers in the i-mscp configuration. I don't know where the problem is. One thing I've found is, that the /var/www/imscp/gui/public/domain directory is still clear. As far as I understood the code, there should be a index.php and a .htpasswd file.


    I've no idea what's wrong. I appreciate every way of help!


    Thanks in advance!
    MR_LOLKOPF



    UDPATE:


    I tried now to disable authentication and also disabling the restriction of which hosts should be able to transfer zones. I still get a 403: Forbidden.

    Edited once, last by MR_LOLKOPF: small update ().

  • I tried today the old version from UncleJ including the nginx protect location domain listener. This version worked about a month ago on my 1.2.1 installation without problems. Now I get the same behavior with the old version on 1.2.11. No folder with the name "domain" will be created under /var/www/imscp/gui/public . With the 1.2.1 installation it worked without problems. There was also no problem with the creation of the "domain" folder.


    I can't find any hints in the imscp-setup.log file.


    Maybe something got changed in i-MSCP in the last versions, so that there is a problem when listeners want to create a folder there?


    I have no idea anymore. I tried it yesterday so many hours and today the whole day. I don't get it solved. I hope someone have a idea.


    Thanks in advance!

  • @MR_LOLKOPF


    I'll try the version from the contrib directory this week-end ok ?

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

  • @Nuxwin


    This would be absolutely awesome!!!


    If you need more information for reproducing or something else, I will provide them!


    Have a nice evening and thanks in advance! :)

  • @MR_LOLKOPF


    Distro, codename? Apache2 version?

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

  • @MR_LOLKOPF


    Sorry to annoy you again but please, can you give me the configuration values you're using in the listener file? Hide sensible data if needed.


    BTW: The code from that listener is... Even my mother could write better code... I'll review it a bit in same time...


    Thanks.

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

  • @Nuxwin


    You are in no way annoying me! ;) I'm very happy that you try to help me! :)


    I tried different configurations.


    1. Try: I just let everything like it is. I just changed the username and the password. Everything else was perfect for me.


    2. Try: I set

    Code
    1. $secondaryDnsUsername = '';

    to disable the authentication for testing purposes.


    3. Try: I set

    Code
    1. $setOnlyAccessableBySecondaryDnsServer = 0;

    so that any host can access the transfer script for testing purposes.


    4. Try: I set

    Code
    1. $manualSecondaryDnsServers = 'xxx.xxx.xxx.xxx';

    to manually specify my name servers for testing purposes.


    5. Try: I discovered the the "domain" folder won't be created under /var/www/imscp/gui/public so I played a bit with

    Code
    1. $htpasswdFilePath = $main::imscpConfig{'GUI_PUBLIC_DIR'} . '/domain/.htpasswd';

    and with


    Code
    1. $transferScriptFilePath = $main::imscpConfig{'GUI_PUBLIC_DIR'} . '/domain/index.php';


    No luck. Nothing worked. The "domain" folder just does not get created.


    Like I said, my "dream configuration" would be just the default configuration. I would only change the username and the password.


    Thanks in advance! :)

  • @MR_LOLKOPF


    For me too. Default conf should be ok. Only HTTP basic auth username and pasword should be set.


    Ok, I finish the review and I will test. It seem that the afterInstall event is no longer triggered in version 1.2.11 which could explain why the folder and transfer script are not created. If the event is not triggered, the listener never acts ;)


    I'll investigate more and fix ;)


    Another thing is the usage of the Satisfy directive which is deprecated in Apache 2.4.x. I'll also investigate for this issue.



    Edit: The afterInstall event is still triggered. I'll so investigate ;)


    /home/nuxwin/Bureau/imscp-git/imscp-1.2.x/autoinstaller/Functions.pm (line 279)

    Perl
    1. $rs = iMSCP::EventManager->getInstance()->trigger('afterInstall');
    2. return $rs if $rs;

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

  • @MR_LOLKOPF


    Still in progress ;)


    Code
    1. root@wheezy:/var/www/imscp/gui/public/domain# ls -la
    2. total 20
    3. dr-xr-x--- 2 vu2000 vu2000 4096 janv. 16 15:30 .
    4. dr-xr-x--- 8 vu2000 vu2000 4096 janv. 16 15:24 ..
    5. -rw-r----- 1 vu2000 vu2000 171 janv. 16 15:30 .htaccess
    6. -rw-r----- 1 vu2000 vu2000 48 janv. 16 15:30 .htpasswd
    7. -rw-r----- 1 vu2000 vu2000 1735 janv. 16 15:30 index.php


    I've fixed many things in the listener. I'll make it available here soon.

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