Secondary DNS server.

Discussion in 'ISPConfig 3 Priority Support' started by pvanthony, Jul 27, 2025.

  1. pvanthony

    pvanthony Active Member HowtoForge Supporter

    I was reading through the following article to setup a secondary DNS server using ispconfig.
    https://www.howtoforge.com/how-to-r...and-secondary-with-ispconfig-3-debian-squeeze
    Currently the main server is ispconfig single server setup. It is in a data center.
    I want to setup the secondary ispconfig server with all the services but only the DNS is mirrored with the primary ispconfig.
    The secondary ispconfig will in my office. The office does have static ip address.
    Is it possible to setup a secondary ispconfig server in a different network from the primary ispconfig?
    What ports need to be open in the primary ispconfig for the secondary to work?
    Anything else I should be aware off?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The tutorial you want to use is very old; please use the current multiserver setup instead:

    https://www.howtoforge.com/tutorial/ispconfig-multiserver-setup-debian-ubuntu/5/

    Yes.

    The secondary DNS must be able to reach MySQL on your primary server and also BIND to copy the DNS zones.

    No.
     
    pvanthony likes this.
  3. remkoh

    remkoh Active Member HowtoForge Supporter

    If it's just a secundary dns you want, why not use one of the free ones out there?
    I'm using NS-Global DNS Service and Hurricane Electric as secundaries for my personal domains, next to my own ispc primary (and secundary) dns server(s).
    No need to install a whole server just for that functionality.
     
    pvanthony likes this.
  4. pvanthony

    pvanthony Active Member HowtoForge Supporter

  5. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Let me check them out. Thank you for the advice.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, when you mirror DNS using secondary zones in BIND, as shown in the tutorial that I posted the link to.
     
    pvanthony likes this.
  7. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Got it. Thank you for the quick reply.
     
  8. pvanthony

    pvanthony Active Member HowtoForge Supporter

    It seems that the primary ispconfig was setup as a standalone.
    So mariadb is serving by socket file.
    Need some guidence on how to configure mariadb to serve by tcp on port 3306.
    Will it break the current setup?
    Also is there a way to make mariadb only reply to one ip address? For example the static ip address of the secondary ispconfig.
    A bit scary to expose 3306 to the internet.
     
  9. remkoh

    remkoh Active Member HowtoForge Supporter

    To let mariadb listen on tcp, enable or add in /etc/mysql/mariadb.conf.d/50-server.cnf under [mysqld]
    Code:
    bind-address = 0.0.0.0
    port = 3306
    
    This can co-exist next to the unix socket settings you already have.

    You can't do firewalling within mariadb but of course you can on your ispc server's firewall and your router/firewall connecting it to the big bad internet.
     
    pvanthony likes this.
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    And check that you do not have 'skip-networking' in the MariaDB config.

    Besides what @remkoh mentioned, the MariaDB users require a password, and the request must come from the correct IP, as the IP is part of the authentication process, so even if an attacker had the right password, they wouldn't be able to log in if he is not connecting from your other server.
     
    pvanthony likes this.
  11. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Thank you for the configuration. I will try it out.
     
  12. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Where do I set the ip address in the secondary mariadb server to only allow login using only the ip listed?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Follow the guide I posted at the beginning, it contains all necessary steps.
     
    pvanthony likes this.
  14. pvanthony

    pvanthony Active Member HowtoForge Supporter

    My bad. I should have read from page one.
    Thank you for this. I will go through the documents again.
     
  15. pvanthony

    pvanthony Active Member HowtoForge Supporter

    you are correct. All the information was in the documentation. Thank you for your advice.
    The secondary dns is working now.
     
    till likes this.
  16. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Just to confirm, I have to create a secondary zone for each of the zones, correct? It will not just sync all the domains automatically, correct?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to create secondary zones.
     
    pvanthony likes this.
  18. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Thank you for the quick reply.
     

Share This Page