Change from MyDNS to Bind

Discussion in 'Installation/Configuration' started by kerrsmith, Mar 12, 2010.

  1. kerrsmith

    kerrsmith New Member

    I am just wondering if there is a way to go from using myDNS to Bind?

    I have just upgraded to the latest version and see that Bind can now be used and was thinking about trying to change.

    It is more of an experiment really, myDNS works perfectly well but I just thought I might have a go on my test server.
    Last edited: Mar 13, 2010
  2. kerrsmith

    kerrsmith New Member

    Is it a matter of just deleting myDNS, installing Bind using apt and then running the upgrade script again or is it not really possible unless you are starting from a clean install?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The bind setup is based on config files and not on a mysql database, this makes switching to bind a bit more complicated. If you want to switch form mydns to bind, you have to uninstall mydns, then install bind, then run the ispconfig update.php and select to reconfigure services. Then go to the ispconfig server settings and check that the path for the named.conf file and the directory for the bind config files is correct. Afterwards you will have to edit every dns record (zone) in ispconfig, change a value like the ttl and click on save, so that the bind files get written for this record.
    Last edited: Mar 18, 2010
  4. kerrsmith

    kerrsmith New Member

    Thanks for the information, I did the following and it appears to have worked as expected:

    Deleted myDNS from the server and removed from startup directories
    Restarted server
    Installed Bind9
    Downloaded ISPConfig and ran update.php
    Logged in to control panel and checked DNS settings under the Server Config menu, they were all correct
    Edited DNS record to trigger an update
    Manually checked the bind directory and the new DNS file was created

    It looks as if everything worked and the new Bind DNS server is responding to requests for the domain names it hosts.

    Thanks again for the help.
  5. admins

    admins Member HowtoForge Supporter

    And how do you do the dns replication with bind?
    I run with mydns the dns replicationscript wich franz has written.
    May bind isn't based on mysql.

    Could you write a howto, with the path where i must delete the mydns files and startup entries?

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Why do you want to switch to bind with your current setup? The functions that yu have now ith mydns are the same then with bind.
  7. kerrsmith

    kerrsmith New Member

    The only reason I wanted to switch was just as an experiment to see how I could do it.

    Mydns works perfectly for me but I have a test server that I use to play about with as I find it a great way to learn how things work, if it all goes wrong I can just blank it and start again from scratch.

    To remove mydns I just did a search on the hard drive for files called mydns and deleted them then went in to the rc[0 1 2 ...].d directories and removed the mydns files (this prevents mydns from starting on boot). I then restarted and installed bind9 and then edited all my dns zones as recommend by Till.

    After this bind9 had all the required data in its zone files and was working as expected.
    Last edited: Mar 31, 2010
  8. lucani

    lucani Member

    I have a question: You downloaded MyDNS tar.gz package ( 2009-03-26 ) or maybe files from SVN? I noticed that although tar.gz package was released more than year ago, there was changes in SVN (e.g. and before). One of rev should fix problem with axfr (from description). So tell me if you used SVN and this is the reason why it works for you but not for me.
  9. baskin

    baskin Member

    Which update.php we have to run and how?
  10. artmanseattle

    artmanseattle New Member

    When you download ISPConfig3 again (since it is no longer in your /tmp directory) and look in the 'install' directory, you will find update.php as well as all the other scripts for manipulating your ISPConfig3 installation.
  11. baskin

    baskin Member

    So although i have ispconfig installed, i have to downloaded again so i can use the update.php?

    This is not going to hurt the already installed system?
  12. artmanseattle

    artmanseattle New Member

    No, it will not hurt your system even if you were to invoke the install.php script. It would just tell you ISPConfig3 is already installed and to try update or upgrade so no harm would be done anyway. All you are doing is repopulating a directory with the files needed to install, upgrade, or update your ISPConfig3 installation
  13. baskin

    baskin Member

    Ok thank you very much for the info. I will migrate to bind soon (as soon as i have some time) and report if i have any problem.

    Again thanks!!!
  14. baskin

    baskin Member

    And how should i run the update.php?

    php -q update.php is enough?
  15. artmanseattle

    artmanseattle New Member


    I am not totally sure (can't recall) but if it follows the scenario for the OS update you would first run that command and then upgrade. Update seems to gather the info about the availability of updates and Upgrade does the actual install.

    So, while in the install directory.... do php -q update.php and then php -q upgrade.php. I am almost certain that is what I did.

    To be honest, I don't know about the -q. I was trying to find out what that option means but I couldn't find it anywhere. I know I ran it on my machines without any problem but I would like to know what the option '-q' is all about.
    Last edited: Sep 22, 2010
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    You mix up ISPConfig und OS update. The command:

    php update.php

    is the ispconfig update script which is in the install folder of the ispconfig tar.gz file.
    It is not related to Linux OS updates.
  17. baskin

    baskin Member

    Ok i have done the migration to bind. Zone files have been created successfully in /etc/named.d also zone files are listed in /etc/named.conf.include but the name server does not respond to the requests.

    Forwarders seem to work only from the same machine (the server itself).

    From the server itself:

    dig @localhost
    ; <<>> DiG 9.5.0-P2 <<>> @localhost
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28155
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 3
    ;                   IN      A
    ;; ANSWER SECTION:            4917    IN      CNAME         462     IN      A
    ;; AUTHORITY SECTION:                5945    IN      NS                5945    IN      NS                5945    IN      NS
    ;; ADDITIONAL SECTION:             9602    IN      A        4953    IN      A          21413   IN      A
    ;; Query time: 1 msec
    ;; SERVER:
    ;; WHEN: Wed Sep 22 22:48:36 2010
    ;; MSG SIZE  rcvd: 187
    This is ok but for one of the zone that i have:

    dig @localhost router1.alimonos.cywn
    ; <<>> DiG 9.5.0-P2 <<>> @localhost router1.alimonos.cywn
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 54708
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;router1.alimonos.cywn.         IN      A
    ;; Query time: 0 msec
    ;; SERVER:
    ;; WHEN: Wed Sep 22 22:50:10 2010
    ;; MSG SIZE  rcvd: 39
    The zone file for this zone is:

    $TTL        86400
    @       IN      SOA     aragorn.kernel-port.cywn. (
                            2010092206       ; serial, todays date + todays serial #
                            28800              ; refresh, seconds
                            7200              ; retry, seconds
                            604800              ; expire, seconds
                            86400 )            ; minimum, seconds
    ap1      A
    palam2fw      A
    router1      A
    and /etc/named.conf.include has:

    zone "alimonos.cywn" {
            type master;
            allow-transfer {;;};
            file "/etc/named.d/pri.alimonos.cywn";
    Also from other machines on the network i get this even for forwarded domains.

    dig @ router1.alimonos.cywn
    ; <<>> DiG 9.7.1 <<>> @ router1.alimonos.cywn
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 57715
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available
    ;router1.alimonos.cywn.         IN      A
    ;; Query time: 2 msec
    ;; SERVER:
    ;; WHEN: Wed Sep 22 22:53:01 2010
    ;; MSG SIZE  rcvd: 39
    What have i missed. It is my main DNS server on a wireless community network and i'm in trouble.:(
  18. baskin

    baskin Member

    I have solved the recursion error by adding

    allow-recursion {; };
    for my network and now forwarders are working from other hosts in the network, but i'm continuing to not get any answer for my zones.
  19. baskin

    baskin Member

    Ok i think i found it. I don't have NS records on the zone files. I'm configuring them now and if i have problem i report back.
  20. djbill

    djbill New Member

    Thank You, works fine for me on Debian 4.0

Share This Page