DNS Zone - Configuring only subdomain

Discussion in 'Server Operation' started by Marcio Urakawa, Jun 27, 2020.

  1. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    I'm trying to set up a DNS structure in which I still haven't figured out how to do it.

    At my workplace I have a DNS BIND server, and now I am finishing installing ISPCONFIG.
    I want everything I configure for a subdomain in Ispconfig to propagate without having to configure it in BIND again.

    As the main server is BIND, in ispconfig should I configure which type of DNS?
    In ispconfig I will configure only my company's subdomains.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The book I use is https://www.oreilly.com/library/view/dns-and-bind/0596100574/
    Are these only for internal use inside your company?
    Depending on the exact setup and requirements, what might work is making the ISPConfig name server authoritative for the subdomains. Then other name servers would query it for the name service information.
    I do not understand what that question is about.
    Another approach might be setting up the subdomains as zones in ISPConfig, and then manually adding the workplace existing DNS server as slave server for those zones. I have not done it like this with ISPConfkg, but is should work. Downside is that every time you add a zone, you must manually add the workplace DNS server as slave for that zone.
    In my signature there is a link to name service tutorial.
     
    Marcio Urakawa likes this.
  3. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    We only have one domain and all sectors have subdomains. I want Ispconfig to be able to use all the domain that has been delegated to ispconfig.

    For example:

    on the primary server is where I control domain.com

    In the examples of zone delegation that I find are just to work intranet.domain.com

    I asked this because on the server where Ispconfig is, I still don't understand if I use slave, or I can configure the registers normally as the dns main server
     
  4. ahrasis

    ahrasis Well-Known Member

    If I understand you correctly, and if you have pointed your domain.com to your server ip, all you need to do is to set * as cname of your domain.com, so all subdomains of domain.com goes to the same server.
     
    Marcio Urakawa likes this.
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I don't think ISPConfig supports being a slave server for a zone. So for any zone or domain you set up in ISPConfig the ISPConfig server must be master or primary for that zone or domain. You can, however, set up a second ISPConfig server to be the slave for that zone, but that works for ISPConfig only if also the primary is an ISPConfig server in the same multiserver setup.
    Is it a requirement to have two sets of name servers inside your company? The existing ones stay as is, and you add a set of new servers with ISPConfig? I ask this because as far as I understand your concerns, all the problems you are seeing would not exist if you got rid of the existing name server setup and set up new name service with ISPConfig. Then you would need to maintain only one name service.
     
    Marcio Urakawa likes this.
  6. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    I work at a university in Brazil, the university has only one domain. The rest are just subdomains that we provide to teachers and staff. For each configuration in the DNS, we go to BIND and perform it manually, my intention is to pass this work on to the service sector so that we do not have to manually configure each site created at the ISP. As the service sector has limitations in relation to information technology, i am configuring somehow for them to use the Ispconfig interface. That way I will no longer have to worry about configuring, but the service sector that will use the Ispconfig interface.

    Yes.

    Yes, this is what I'm trying to. Trying to perform a domain delegation to ISPconfig is an NS and that NS is configured in the main DNS. I set up a client with the domain I want to use and all the sites I create, a CNAME for Ispconfig would be added, but it still didn't work, in the next few days I hope to solve it and come to share the solution.
     
  7. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    I wanted to use the wildcard only in the latter case.
    I don't know if this could be a problem in the future, because in the same environment we have several systems of all types on other servers.
     
  8. ahrasis

    ahrasis Well-Known Member

    Meaning?
    Why should it cause you problem in the future? ISPConfig is multiserver ready.

    By the way, from what I understand, you need to build a proper ISPConfig dns server and use it instead of using other dns server, so check ISPConfig manual and tutorials on the how-to and ask question on which part you do not understand.

    @Taleman is trying to help you but in order for him to succeed you must understand what you are trying to do and achieve, then provide the necessary information as required.
     
    Last edited: Jun 28, 2020
  9. nhybgtvfr

    nhybgtvfr Active Member

    as the others have alluded, it's not completely clear exactly what you're trying to end up with as an endpoint.
    at the moment, it sounds like all of your bind configuration is created and updated manually.

    it does sound, based on what i can understand of your requirements, that the easiest, and most maintainable solution is to create a new ispconfig system with two new dns servers, one running as a mirror to the other one, and make these two new dns servers the dns servers for your university domain. removing that zone completely from your previous dns servers.

    all you'd need to do for that, once the servers are configured and the dns zone initially created, is ensure all the existing records in that zone are recreated on the dns servers, change the NS and A record targets for the dns servers to point to the ip's of the two new dns servers. and then set the two new dns servers as the nameservers for that domain at your registrar, and create glue records for those two servers with your registrar.

    you can create a wildcard subdomain record in ispconfig, and all queries for subdomains that are not explicitly set in dns will use that record, any subdomains that are configured, eg www, mail, server1/server2/.../serverN etc will point to whatever target ip/name is specified for the A/CNAME/MX/NS etc record.
     
    Marcio Urakawa likes this.
  10. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    Yes.

    In a way I did it, but when I add type A records to the DNS it does not update automatically.
    Only when I recreate the zone and add the records again will it be updated. I don't know if there is a command in ISPCONFIG to update this but I couldn't.

    Code:
    $TTL        3600
    @       IN      SOA     dns.ispconfig.mydomain.br. mail.myisp.mydomain.br. (
                            2020063033       ; serial, todays date + todays serial #
                            60              ; refresh, seconds
                            540              ; retry, seconds
                            604800              ; expire, seconds
                            3600 )            ; minimum, seconds
    ;
    
    a2 3600 A        111.222.333.60
    a3 3600 A        111.222.333.60
    dns.ispconfig.mydomain.br 3600 A        111.222.333.60
    myisp.mydomain.br. 3600      NS        dns.ispconfig.mydomain.br.
    a4 3600 A        111.222.333.60
    a5 3600 A        111.222.333.60
    a17 3600 A      111.222.333.60
    
    And on the main DNS server I left it like this:
    Code:
    ;; AUTHORITY SECTION:
    myisp.mydomain.br.         60      IN      NS      dns.ispconfig.mydomain.br.
    
    ;; ADDITIONAL SECTION:
    dns.ispconfig.mydomain.br.  60      IN      A       111.222.333.60
    
    111.222.333.60 is the ip of the Ispconfig machine. I switched to post here.
     
  11. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    It is because ISPCONFIG was theoretically made for commercial purposes, where each user has his domain. The way I want to use it, all users have the same domain, what changes is the subdomain.
    That way I want to manage ISPConfig to work in the same domain and that I can manage only the subdomain.
    Regarding the wildcard I only thought about security, unfortunately government domains have a lot of improper access.
    And as I am still in the testing phase, I did not reach a conclusion, thanks anyway for the suggestions.
     
  12. nhybgtvfr

    nhybgtvfr Active Member

    that's not right. i assume the domain you have registered is just mydomain.br. if so, the NS record should be:
    mydomain.br. 3600 NS dns.ispconfig.mydomain.br.

    i don't know why you've set it as dns.ispconfig.mydomain.br, whether there's some internal politics in the naming conventions, or just to identify the servers to you as running ispconfig. i would, personally, just set it as dns.mydomain.br.

    also, for the A record, as you have it there, it should be either dns.ispconfig with no trailing . or dns.ispconfig.mydomain.br. with the trailing . as you've got it, dns will interpret that record as dns.ispconfig.mydomain.br.mydomain.br
     
    Marcio Urakawa likes this.
  13. nhybgtvfr

    nhybgtvfr Active Member

    Marcio Urakawa likes this.
  14. Marcio Urakawa

    Marcio Urakawa Member HowtoForge Supporter

    I believe I got it.
    When I want to register a subdomain I log in with admin login and insert an A record with "sitename" and the subdomain is created.

    When a user requests a site, with the name "mysite"
    I go to the created zone and enter record A:
    mysite IN A 111.222.333.60

    That he will be recognized as:
    mysite.mydomain.br

    As it is a zone delegation, all my users are using the main DNS and not ISPConfig but it is working.
    I am now seeing how it changes the update time, because sometimes it takes a little while to work.
     

Share This Page